Results 1 to 2 of 2

Thread: Connecting menu click with action

  1. #1
    Join Date
    Apr 2011
    Posts
    67
    Thanks
    22
    Thanked 5 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Connecting menu click with action

    I have created some pop up menus on my save button with this code.

    Qt Code:
    1. QMenu *menu = new QMenu(this);
    2. menu->addAction("Save New");
    3. menu->addAction("Save Edits");
    4.  
    5. ui.saveButton->setMenu(menu);
    To copy to clipboard, switch view to plain text mode 

    I want when a user clicks 'Save New' an action is executed.How will i do that?.

  2. #2
    Join Date
    Dec 2008
    Location
    France
    Posts
    93
    Thanked 23 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: Connecting menu click with action


  3. The following user says thank you to nix for this useful post:

    thefatladysingsopera (23rd August 2011)

Similar Threads

  1. Replies: 4
    Last Post: 16th February 2011, 15:46
  2. Menu open action -reg
    By jsmith in forum Qt Programming
    Replies: 1
    Last Post: 8th May 2009, 11:07
  3. Action-Menu-Button
    By hgedek in forum Newbie
    Replies: 1
    Last Post: 1st October 2007, 16:41
  4. ToolBar Action With Menu
    By indifference in forum Qt Programming
    Replies: 4
    Last Post: 10th September 2007, 19:37
  5. Action on menu to display ui
    By jochen_r in forum Newbie
    Replies: 10
    Last Post: 10th January 2006, 10:10

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.