Results 1 to 6 of 6

Thread: Questions to QMenu

  1. #1
    Join Date
    Jun 2009
    Posts
    12

    Default Questions to QMenu

    1) How do I set a QMenu to a specific so that the arrow is at the right edge of the window. When doing resize the widget becomes as big as specified but the arrow is directly behind the string and not at the right edge.

    2) How can I do multiline submenus (the menu entry has to span two lines). For action I achieved this by using QWidgetAction and a subclass of QLabel but I do not see a way to do it with menus.

  2. #2
    Join Date
    Jun 2009
    Posts
    12

    Default Re: Questions to QMenu

    Nobody any idea?

  3. #3
    Join Date
    Jan 2006
    Location
    Knivsta, Sweden
    Posts
    153
    Thanks
    30
    Thanked 13 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Questions to QMenu

    Please try to rephrase your question to make it more clear, e.g. what is the relationship between "the widget" and the QMenu? between "the string" and the QMenu? Is "the window" the same as the QMenu or as "the widget" etc.

  4. #4
    Join Date
    Jun 2009
    Posts
    12

    Default Re: Questions to QMenu

    Okay I will try to clarify this. I attached pictures of what I want.

    to 1) image menusize.png shows the result of a resize call on a QMenu. How do I get the arrow to the right edge?

    to 2) image menu.png (made with gimp) shows a Submenu that spans two lines (highlighted in blue). How do I program such a menu?

    I hope it is clearer now.
    Attached Images Attached Images
    Last edited by tyrdal; 6th October 2009 at 07:57.

  5. #5
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Questions to QMenu

    Did you try updating the menu ?
    try calling update after the resize

  6. #6
    Join Date
    Jun 2009
    Posts
    12

    Default Re: Questions to QMenu

    Now I did. It does not change anything.

Similar Threads

  1. QMenu popup: how close when clicked outside
    By powermax in forum Qt Programming
    Replies: 5
    Last Post: 4th March 2009, 03:18
  2. QStyle : how to make the QMenu display in middle?
    By nish in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 27th November 2008, 10:39
  3. how to popup and close a QMenu
    By Placido Currò in forum Qt Programming
    Replies: 15
    Last Post: 14th May 2007, 16:41
  4. Memory management questions (im new to Qt)
    By scarvenger in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2007, 07:41
  5. Qt related questions and thoughts about getting job
    By AlexKiriukha in forum General Discussion
    Replies: 4
    Last Post: 26th January 2006, 12:25

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.