PDA

View Full Version : changing Parent/Ancestor of Widget



Bobbyth
10th January 2014, 19:32
Hi,

i am new to QT and i am trying to create an application which does the following:

I will have some buttons and when a user presses those button different Widget should pop up(in this case I am using Group Box form Containers. The programming logic do that works for me. But the issue that I need to have the Widgets on top of each other and when you try to design it, it automatically makes my next widget parent of the previous one. I don't know how to break the relationship. I did read about the .setParent method, but that would mean i need to create the Widgets programmatically, which I don't want to, since drag and drop is easy.

So my question is can I break the child and parent relationship or change the widget parent and still have them stacked up on top of each other?

Hope you understand the question!

BTW using QT5.1

Thanks

ChrisW67
10th January 2014, 20:57
QStackedWidget