Results 1 to 3 of 3

Thread: How to go to slot of an action on the menubar?

  1. #1
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Cool How to go to slot of an action on the menubar?

    Hi.. I created a menubar on the mainwindow of my application ... i had added also some actions.. but how to go to the slot of this actions... for example if you click on the Help-->About i want a QMessageBox to been shown.....
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to go to slot of an action on the menubar?

    QAction has a triggered() signal. Connect a slot to it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to go to slot of an action on the menubar?

    there is also a shortcut addAction overload which takes the slot to be connected as the parameter.

Similar Threads

  1. Replies: 5
    Last Post: 4th February 2010, 17:15
  2. Replies: 1
    Last Post: 22nd January 2010, 11:22
  3. action -> slot in Qt Designer
    By yuriry in forum Qt Tools
    Replies: 4
    Last Post: 6th October 2008, 19:17
  4. Replies: 1
    Last Post: 23rd August 2008, 22:09
  5. No action checked in an exclusive action group
    By SkripT in forum Qt Programming
    Replies: 12
    Last Post: 13th February 2006, 06:19

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.