PDA

View Full Version : Questions to QMenu



tyrdal
2nd October 2009, 13:19
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.

tyrdal
5th October 2009, 13:20
Nobody any idea?

drhex
5th October 2009, 23:46
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.

tyrdal
6th October 2009, 08:36
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.

aamer4yu
6th October 2009, 13:18
Did you try updating the menu ?
try calling update after the resize

tyrdal
6th October 2009, 13:29
Now I did. It does not change anything.