Results 1 to 2 of 2

Thread: Set QButton to clicked as the result of a Menu Action

  1. #1
    Join Date
    Apr 2016
    Posts
    1
    Qt products
    Qt3
    Platforms
    Windows

    Smile Set QButton to clicked as the result of a Menu Action

    Hello,

    I did put a new Button to a main widget on mainwindow.ui, and have already a menu option " New Game". I created an evenHandler as

    void MainWindow:n_actionNew_Game_triggered()
    {
    // Here I want to set my button status to "Clicked" as the reaction of New_Game_triggered()!!!!!

    }

    How to perform it?

    So long I have not seen the creation of a new QBUtton object more than a visual creation on mainwindow.ui.

    How to?

    1. Create a QButton object, if needed?
    2. How to set its status to "clicked"?

    Best regards

    Mbc

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Set QButton to clicked as the result of a Menu Action

    Can you rephrase that?

    If you activate the menu, why would you want to additionally simulate a button click?

    Cheers,
    _

Similar Threads

  1. Can't check the action when it has a menu?
    By koilin in forum Qt Programming
    Replies: 1
    Last Post: 13th July 2012, 03:53
  2. Replies: 1
    Last Post: 4th November 2011, 11:25
  3. Menu open action -reg
    By jsmith in forum Qt Programming
    Replies: 1
    Last Post: 8th May 2009, 11:07
  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

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.