PDA

View Full Version : Custom Container with predefined child widgets



nibedit
21st April 2014, 07:45
I am trying to create a custom container which has top region, bottom region and a central region [like QMainwindow].
The central widget is scrollable. If I create the custom plugin with these widgets , then while drag and drop, the parent is the whole widget instead of central widget. e.g:- If I add a button , instead of it is created added to the central widget , it gets added to Form and it takes the parent layout.

This works well if I create the widgets in domXml(). But disadvantage of domXML() is the Widget can be deleted in designer and if created by new it doesn't come with predefined widget.
Please refer the image attached.

I want the way QMainWindow manages the layout for Toolbar ,status bar and central widget.
I can't make use of Mainwindow, because incase of Toolbar, I need QLabel and Instead of QStatusbar, I need QFrame.
Any help is appreciated.

10296

wysota
30th April 2014, 08:50
Show us some related code, please.