Reputation: 1462
Completely using QT Designer. I've created a QWidget
to encapsulate a collection of controls. I now want to use this QWidget
several times in the QMainWindow
form.
How do I 'put' my QWidget
onto the QMainWindow
using QT Designer only?
Shouldn't this just be a simple drag and drop operation? What am I missing?
Upvotes: 3
Views: 3718
Reputation: 1125
You can promote widgets.
Simply drag and drop QWidget into your mainwindow with QtDesigner.
Right click on it and press promote to
In the dialog fill in your created widget's Class name (header should be filled in automatically if it doesn't match edit accordingly) press add
and promote
.
Now build and run your application and you should see your widget with collection of controls.
Upvotes: 5