QPainterPath is a class from the Qt Toolkit which provides a container for painting operations, enabling graphical shapes to be constructed and reused.
Questions tagged [qpainterpath]
53 questions
0
votes
1 answer
Changing Color of subpaths within a QGraphicsPathItem?
So I'm currently using the code here, previous post to create and update a QGraphicsPathItem.
All of this works fine, but now I need to change the color of the subpaths included in the pathItem. I can see that using QPainter, I could stroke the…

bauervision
- 847
- 2
- 9
- 25
0
votes
1 answer
Animation on a QPainterPath Object
I would like to display an animated arrow shape button.
To draw it, I creat a class which inheriths QGraphicsObjectand use the QPainterPath class.
I draw it in a QGraphicsScene and animate it using the property geometry, re defined in MyArrow…

TaiZzZ
- 53
- 11
0
votes
0 answers
how can I get if a QPolygon is simple?
I am coding a tool that enables to draw polygons.
I want them to be simple polygons and forbid drawing complex polygons.
I have tried ToSubpathPolygons()
I have the list of QPoints that form the polygon.
I am coding in c++ + Qt. I think I could try…

P.Perez
- 9
- 4
0
votes
1 answer
How to implement scribble drawing with possibility to erase paths in QT?
What would be the right approach to implement scribble like drawing in QT but also be able to erase some of the drawn paths?
I've seen some examples where drawing is implemented by adding ellipses as points to images (QImage) but as far as I…

Damir Porobic
- 681
- 1
- 8
- 21
0
votes
1 answer
QPainterPath closing a curve subpath at end point
I have a problem with QPainterPath because when I do this:
QPainterPath path(start);
path.quadTo(control, end);
QPainter painter;
painter.setBrush(Qt::black);
painter.drawPath(path);
it draws the area beneath the curve black as well. Using…

Resurrection
- 3,916
- 2
- 34
- 56
0
votes
0 answers
How to draw Convex Rectangle in combination with ellipsoids by using Qt4.8 (C++)? (top view of a boat)
I'm currently trying to draw the top view of a boat by using Qt 4.8 (C++).
I want to implement a QWidget in which a boat moves around.
Therefore I need to draw the top view of a boat, it should look similiar to this (only need the outer…

Philipp Doublehammer
- 322
- 1
- 5
- 18
0
votes
1 answer
Qt draw small 'x' icon on custom-rendered control
I'm drawing a custom control in Qt in the paintEvent function (so I have a QPainter to do the drawing). Now I'd like to add a small close 'x' icon that animates when the mouse is over it.
I know that QPainterPath has a "contains" method that I can…

Albert
- 1,085
- 2
- 10
- 20
0
votes
0 answers
How does Qt paint the painter path
The hierarchy of classes in Qt (5.4 version) is awesome. I tried to find solution in Qt's sources, but my end point of investigation is the QPaintEngine. This class has member:
virtual void QPaintEngine::drawPath(const QPainterPath &)
This member…

Alex Aparin
- 4,393
- 5
- 25
- 51