PDA

View Full Version : Z-Order QLabels in QWidget



EarthHobbit
13th April 2015, 08:00
Hi,
I have multiple QLabels in one QWidget. How can I change the Z-Value of these QLabels to have the control on which one is on top of the others ?
I need to do it dynamically as I sometimes want to add a QLabel below the others.
Thanks !

wysota
13th April 2015, 08:32
Use Graphics View instead of what you have now.

EarthHobbit
13th April 2015, 08:38
My QWidgets are already part of a GraphicsView. Can I have GraphicViews part of other GraphicViews ?
Thanks.

wysota
13th April 2015, 08:57
Widgets are part of Graphics View? Why? Why aren't you using graphics items?

EarthHobbit
13th April 2015, 09:14
Because 1 week ago I had even no clue of the existence of Qt :-)
Learning, learning, learning.
Thanks !

wysota
13th April 2015, 09:18
So start using graphics items and make use of their z-order value.