Qpainter always print behind label
-
Looks like you paint on widget that contains these labels. And labels' paintEvents are called after your widget paintEvent.
-
Each widget (also a QLabel) has a background that is drawn onto the parent (e.g. your main window). You can reimplement each widgets paintEvent in a subclass and do your own painting there. If you overwrite the paintEvent of the main windwd, you draw behind each child, so behind the labels.
If you want to change the labels, make a subclass of QLabel and use that instead of QLabel. Overwrite paintEvent in your QLabel subclass and draw there.
If you want some main window image behind all labels, you could also make the labels transparent.