Results 1 to 2 of 2

Thread: Changing ToolButton POPUP Menu orientations.

  1. #1
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    1
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60

    Post Changing ToolButton POPUP Menu orientations.

    I create a one QToolButton and adding some Menu Actions on it. I want Change the orientations of menu. Currently all menu items show me in veritcal manner. Please any one tell me how to changes its orientations into Horizontal manners.


    Qt Code:
    1. QToolButton* toolBut = new QToolButton;
    2. QMenu* toolMenu = new QMenu( toolBut );
    3. toolMenu->addAction(action1);
    4. toolMenu->addAction(action2);
    5. toolMenu->addAction(action3);
    6. toolBut->setMenu(toolMenu);
    To copy to clipboard, switch view to plain text mode 

    I want to implement like this way.
    _________ _______ ______________
    |TOOLBTN | ACT1 | ACT2 |ACT3 |
    |_________|______________________|
    |TOOLBTN1|
    |_________|
    |TOOLBTN2|
    |_________|

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Changing ToolButton POPUP Menu orientations.

    AFAIK, and based on what I see in the doc, actions are only represented vertically.
    You will have to subclass, and implement the horizontal representation your self.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Popup menu in TabelView on one row
    By TomASS in forum Newbie
    Replies: 13
    Last Post: 28th September 2009, 08:08
  2. Popup Menu
    By kavinsiva in forum Newbie
    Replies: 2
    Last Post: 25th September 2009, 10:09
  3. Replies: 3
    Last Post: 17th May 2009, 20:17
  4. Disable popup menu
    By febil in forum Qt Programming
    Replies: 7
    Last Post: 26th March 2009, 12:21
  5. Popup menu title
    By Michiel in forum Qt Programming
    Replies: 4
    Last Post: 17th May 2007, 20:48

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.