PDA

View Full Version : Handling z order of QLabels in QFrames



[?]jNs
28th July 2011, 16:55
Hi guys,

I got a question on the z order of QLabels in a QFrame.
The QFrame contains QLabels without any layout, so they can overlap each other.
The QLabels can be moved by clicking on them and with QLabels::raise() I can guarantee, that the one, that is moving is on top of the other labels.
My Problem:
In case I want to drag them out of the QFrame the part of the label that is outside the QFrame.

How can I get the QLabel in front of its parent QFrame?

Thanks for answers :)

Talei
28th July 2011, 17:33
You will have to either to dynamically change the parent for pushbutton or add it to the top layout (so by default they are in front of qframe) and then place in right spot.
Alternatively you can use QGraphicsScene and addWidget() then handle rest of movement there.