hi.
Is some function for drawLine in painter, but without drawing line in some QRect?
example:
i can drawLine from 0,5 to 10,5, but I have rect (5,2,2,5) which is transparent and in this rect i don't want this line
Printable View
hi.
Is some function for drawLine in painter, but without drawing line in some QRect?
example:
i can drawLine from 0,5 to 10,5, but I have rect (5,2,2,5) which is transparent and in this rect i don't want this line
Call QPainter::setClipPath() with a QRegion that excludes the rectangle you do not want to draw inside. You can build the region by starting with one that covers the entire screen and then subtracting one that covers the rectangle.
thanks and is possible set ends of Line was clipped on nearest point of edge of rect?
Clipping is defined by the clipping region so the line will be clipped to whatever region you set.