PDA

View Full Version : Z order for 'standard' widgets.



nouknouk
21st February 2006, 01:16
Hi,

I discovered QCanvas and especially QCanvasItem.

In QCanvasItem, there is a function setZ wich allows to set wich pixmap should be placed 'in front of' or 'behind' another.

Is there a way to do such thing for common widgets (QLabel, QFrame, ...) ?

I think it should be possible without overloading paintEvent() of my widget as Qt4 designer has 'send to back' and 'bring to front' actions in its 'Edit' menu.

Many thanks in advance.

high_flyer
21st February 2006, 11:35
Is there a way to do such thing for common widgets (QLabel, QFrame, ...) ?
The question is what for?
Usually you would use a tab widget when you want ot show various widgets on the same place on form, why wont a tab widget be good solution for you?

nouknouk
21st February 2006, 19:55
Ok, I'm sorry, It was quite simple in fact : I missed the two slots QWidget::raise() and QWidget::lower()

My question was especially for QLabel that are overlapped in my window.

Anyway, thanks :-)

wysota
21st February 2006, 19:59
Overlapping labels? Is that on purpose?