[SOLVED] Signals and Slots for QtDesigner Controls

  • Hi,

    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:

    1. 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.
    2. 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.


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.