Search code examples
qtqt4qt-designer

how to connect QActions to SLOTS using qt designer


I have created a nice looking toolbar using qt Designer and populated it with some actions.
I tried to connect the actions to slots visually from qt designer by clicking edit> signals and slots. This DID NOT WORK because i could not find any QAction signals.

Question.

Is there a way to connect the QAction SIGNAL(triggered()) to my slots within QT designer? Please help.
PS: I am currently being forced to connect through code:

QObject::connect(myAction, SIGNAL(triggered()),this, SLOT(myActionWasTriggered()))

but ia am lazy and i wish to connect using qt designer.


Solution

  • Look here in Docs Designer Connection Mode... How to autconnect in the designer