Results 1 to 5 of 5

Thread: ToolBar Action With Menu

  1. #1
    Join Date
    Aug 2007
    Posts
    6
    Thanks
    4

    Default ToolBar Action With Menu

    Hello all,

    I have a toolbar that contains an action with a menu. The qtoolbutton associated with that action appears with an arrow, that if pressed shows the menu.
    What I want is to give the same behavior to the qtoolbutton it self.

    How can i do that?

    Thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: ToolBar Action With Menu

    So you want the tool button without an arrow?
    See QToolButton::ToolButtonPopupMode and QToolButton::setMenu.

    Regards

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

    indifference (10th September 2007)

  4. #3
    Join Date
    Aug 2007
    Posts
    6
    Thanks
    4

    Default Re: ToolBar Action With Menu

    Thanks for the anwser!

    But no, i don't wan't the button without the arrow. I want the button to display the menu, like the arrow does, if pressed.
    You see, when I press the button it self nothing appens, but if i press the arrow, the menu popups.

  5. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: ToolBar Action With Menu

    Take a closer look at QToolButton::ToolButtonPopupMode. There are two modes that do not show an arrow.
    J-P Nurmi

  6. The following user says thank you to jpn for this useful post:

    indifference (10th September 2007)

  7. #5
    Join Date
    Aug 2007
    Posts
    6
    Thanks
    4

    Default Re: ToolBar Action With Menu

    Oh, ok... I've missed that!

Similar Threads

  1. Docked Widget Menu
    By Chuk in forum Qt Programming
    Replies: 6
    Last Post: 3rd July 2013, 14:12
  2. Replies: 12
    Last Post: 21st November 2008, 04:42
  3. Replies: 4
    Last Post: 25th June 2007, 20:40
  4. Toolbar show menu
    By Michiel in forum Qt Programming
    Replies: 5
    Last Post: 26th May 2007, 15:22
  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.