PDA

View Full Version : action -> slot in Qt Designer



yuriry
5th October 2008, 20:50
I create actions in Qt Designer 4.3.4 and then write code to connect them to standard slots, like close():



connect(m_form.action_Quit, SIGNAL(triggered()), this, SLOT(close()));


Would it be possible to create such connections in Qt Designer?

jpn
5th October 2008, 20:54
Yes, with the Signal/Slot Editor (see Tools-menu).

yuriry
5th October 2008, 21:45
Thank you J-P Nurmi.

I created a fake connection because I could not connect an action with the widget directly. Then I re-defined the connection in Signal/Slot Editor. Is this the right way to do it?

jpn
6th October 2008, 07:36
I'm not sure if it's possible to create such connections on the form in the signal-slot editing mode, but I created it directly in the signal-slot editor by clicking "+" and choosing the parameters.

yuriry
6th October 2008, 19:17
Thank you! I did not notice the plus sign :)