I am creating a custom widget using Qlabels. In this widget I have Qlabels created one over the other like a stack. I need to draw a vertical rectangle on top of the Labels. I used QPainter drawRect() function for drawing this rectangle. But the rectangle is coming in the background of the labels and not on the top of it.
Please see the attachment for details.
In this image the red lines are labels and each labels perform some operation as per code ,and the two vertical lines in the middle are rectangles drawn using QPainter which is coming in the background of the labels. I want the rectangles to draw on top of the labels.
Bookmarks