Hi
I have created a widget by extending a QSpinBox. How can I add it to a dialog that i have created in QT Designer?
Thanks
Amit Khanna
Hi
I have created a widget by extending a QSpinBox. How can I add it to a dialog that i have created in QT Designer?
Thanks
Amit Khanna
You could add something like this to your xxxdialog.cppQt Code:
layout->addWidget(xxxspinBox); xxxdialog->setLayout(layout);To copy to clipboard, switch view to plain text mode
Got to keep the loonies on the path ...
Thanks for the reply. Actually I have a dialog form that i made in QT Designer. The form has a textbox, checkbox and push button. I want to add a MySpinBox to this dialog. Is there some way by which i could get MySpinBox in list of widgets that i can directly to the form?
Amit Khanna
There are 2 ways,,
1 - you can add spinbox in designer, right click and use promote-to option to promote it to the class you have written.
2 - Make your class as a designer plugin and you can drag drop your widget from there.
I guess option 1 will be easier to go.
Bookmarks