[solved]Qt Designer: UI Form as a widget?
Hello,
Using Designer, I’d like to be able to place several instances of a widget created from a UI Form.
What I’d like to do is create a ui form based on the QFrame, add some widgets to the frame, then save the UI form. Next, I’d like to embed a few instances of this form, in a main window form. The advantage of this, is that when I make changes to the frame ui form, the changes get propogated to the instances when the main window form is loaded again.
I looked at widgets like QFrame, but could not find any that can contain a UI Form.
Is there a way to do this?
Thanks
8 replies
Sure. What you basically are doing, is creating your own widget. Just create a new QWidget-based widget using the File -> New wizard, and design the .ui the way you like it. Now, design the .ui in which you want to use those widgets. Drop in a QWidget on there, right click it, and use the Promote to… item to promote the widget to your new widget.
Thanks. Now when I Promote To, I don’t see my widget form listed, I only get to choose from the existing Q classes for the base class and a new class name. Or am i supposed to specifiy an include file? If so, I don’t know how to get those from a form.
So say my new widget is saved in a form called pad.ui. When I promote a qwidget on another form, I don’t see how to specify pad.ui.
Well, you can always open a suggestion ticket for that feature here [bugreports.qt.nokia.com]
You must log in to post a reply. Not a member yet? Register here!



