Quantcast
Channel: Active questions tagged qpainter - Stack Overflow
Viewing all articles
Browse latest Browse all 58

PyQt - Create a function that draws something with parameters provided

$
0
0

I am working on a project that I need to draw, for example, a rectangle every time the QPushButton is pressed using QPainter. This is the first problem, the second one here is that I need some information to be sent to the drawing function too, for example, a list containing tuples, each tuple has 4 elements: x1, y1, x2, y2 - the locations of top-left and right-down point (aka. the function is able to draw multiple rectangles).

So, how do I implement it? or use anything other than QPainter but can do thing like that is also good.


Viewing all articles
Browse latest Browse all 58

Trending Articles