PDA

View Full Version : Adding widgets to layout dynamically



anbu01
12th May 2014, 11:32
hi,
I am working on creating an application that looks and works like qt designer.I am having this strange feeling of how widgets are added to layout when i drag and drop on it.I know we can use custom class
to create all widgets but QLayout is not a QWidget so how do i handle it.So far i have come up with drag and drop all other widgets but when it comes to layout i don't know how to proceed.

thanks,

ChrisW67
12th May 2014, 21:36
Custom widget plugins for Qt Designer have an interface function, isContainer(), that tells Designer the widget can contain others. Designer creates and manages layouts for widgets that are containers. Perhaps you should look at how it keeps track of those.

anbu01
15th May 2014, 12:41
Thanks for your reply. I understood to add a custom plugin to Qt Designer we use QDesignerCustomWidgetInterface. But the problem is I am creating custom Designer Form similar as QtDesigner Form where we drag and drop widgets(PushButton,RadioButton,Vertical Layout etc.) so In my application i am not able to implement Layouts similar as QtDesigner Form as shown in Attached Image below like adding widgets to layout and it should change according to layout.
I Dont know how to proceed.
10364