Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Signals and Slots for QtDesigner Controls
When I add controls such as a simple button to a UI within Designer, these are added to the ".ui" xml file and then translated into C++ by the "moc" and added into a moc generated class.
At this point I would like to add signals and slots for these controls.
I have already used signals and slots once before, but these were coded into my own control object which was a class inherited by QWidget.
Is it possible to add signals and slots to QtDesigner controls?
If so, how and where do I add them in the C++ code?
The QtDesigner controls are added directly as instances of base classes such as QPushButton!
Many Thanks for your help
Forgot to mention that:
- I am using Qt 4.7.1 as this is the only version in which I can cross-compile to deploy my application on QNX.
- I don't want to link controls on the UI necessarily to each other in which case I could use the graphical linking provided by QtDesigner, but need to have signals/slots that are invoked by code external to Qt.
This link "http://blog.psibi.in/2012/04/defining-custom-slot-in-qt-designer.html#!/2012/04/defining-custom-slot-in-qt-designer.html" provides the answer to this issue.