qpainter Questions
4
Solved
I'm trying to make an app where you can draw with your finger on a canvas.
To achieve this, I'm subclassing QWidget as MFCanvas, registered the class in QML with
qmlRegisterType<>(), implemen...
3
Solved
is there a way to draw fixed text that has subscripts. My goal is to have something like: "K_max=K_2 . 3"
QString equation="K_max=K_2 . 3";
painter.drawText( QRect(x, y , width, y+height), Qt::Ali...
4
Solved
3
Solved
3
I want to draw text using QPainter, and I want to use QPainterPath first (because ultimately I want to rotate the text in all sorts of ways). However, I find that the text produced by QPainterPath ...
4
I am trying to fade in and fade out a QLabel or for that matter any QWidget subclass. I have tried with QGraphicsEffect, but unfortunately it works well only on Windows and not on Mac.
The only o...
2
Solved
I want to draw a rectangle with rounded corners (border radius same for all 4 corners) with a specific color filling the entire rectangle, and a separate border color (say border is 1 px wide).
Fr...
Septemberseptembrist asked 22/3, 2015 at 16:5
2
Solved
I draw in my Qt program on a QPainter the text and various elements round it. I need to get the sizes in pixels which will be occupied by this text.
Can I get somehow the sizes in pixels, knowing ...
2
QPainter is very easy to use and to draw a line one would simply do this:
QPainter painter(&image);
QPen pen;
pen.setWidth(5);
pen.setColor("black");
painter.setPen(pen);
painter.drawLine(QPoi...
2
Solved
Given a QPainterPath how can I stroke the path only on the inside or outside edge of the path (or left- or right-side for non-closed paths)?
QPainter::strokePath() centers the pen along the path a...
2
Solved
I want to set text drawing alignment using one point as coordinate, not a rectangle.
As far as I understand QPainter::drawText allows to set text alignment only when I pass coordinates as rectangl...
Publicspirited asked 18/7, 2014 at 18:23
2
Solved
I want to know how Qt does a border when using QPainter's drawRect. The reason for this is I am trying to draw three rectangles next to each other, but I'm having trouble getting them to touch perf...
4
I'm using Qt 4.7 QPainter to draw some polygons, etc into a widget. I am hoping to alter the coordinate system so that (0,0) is at the center of my widget, and the x/y axis behave in a standard "Ca...
Subjoinder asked 10/12, 2010 at 21:43
2
Solved
Many of you Qt (4.6 specifically) users will be familiar with the Overpainting example supplied in the OpenGL tutorials, I'm trying to do something very similar but using shaders for the pure OpenG...
1
Solved
1
Solved
I am trying to learn PyQt vector painting. Currently I am stuck in trying to pass information to paintEvent() method which I guess, should call other methods:
I am trying to paint different number...
3
Solved
This is what I tried, it gave me no output. Where am I going wrong?
// Start point of bottom line
qreal startPointX1 = 600.0;
qreal startPointY1 = 600.0;
// End point of bottom line
qreal e...
1
Solved
I'm trying to draw a rectangle on GUI created by PyQt5 by drag and drop. I managed to do that, but the rectangle is drawn when the mouse left key is released.
What I want to do is like this link: ...
Porosity asked 10/6, 2017 at 1:51
3
Solved
I would like---with Python and Qt4---to rotate a QPushButton (or at least its text) so it can stand vertically. I've seen some documentation online, but I couldn't make much sense out of it---it's ...
Chintz asked 7/9, 2011 at 19:45
1
Solved
I'm working on a new project in Qt, using QPainter to draw a QWidget.
The problem is, when I try to rotate QPainter the text I want to draw rotates out of my QWidget.
I know how to solve the proble...
2
Solved
I'm trying to paint some points of my image and I don't know why it doesn't work. I have defined a QImage and I want to modify some points.
QImage *cou= new QImage(height,largeur,QImage::Format_Mo...
4
Solved
I would like to draw icons (only one color) in different colors. To do so, I would like to import a single alpha-texture and then combine this with a given color in the application.
The result sh...
1
Solved
I'm trying to draw an icon(.png) inside a QWidget with QPainter::drawPixmap()
:
QPixmap _source = "/.../.png";
painter.setRenderHint(QPainter::HighQualityAntialiasing);
painter.drawPixmap(rect(),...
2
Solved
I'm attempting to create a widget that consists of of a single horizontal black line. This widget will be placed in a QGridLayout such that it takes up the entire row, thus acting as a separator. A...
1
I am writing a screenshot utility with PyQt, and the idea is take a screenshot of the whole desktop, then display it in a QLabel, make the window full screen and user selects a region by mouse.
Is...
Kaifeng asked 11/12, 2015 at 9:37
1 Next >
© 2022 - 2024 — McMap. All rights reserved.