View Full Version : Workaround for a Qt ui bug

5th July 2010, 17:24
I'm trying to use a button that has both an icon and a menu assigned. The problem is that I'm running against this old bug: http://bugreports.qt.nokia.com/browse/QTBUG-3624

On Windows XP, the left margin is about twice as large as the right one and the text is clipped by the menu arrow.

Any idea on how I can fix this? The bug is still present in Qt 4.6.2...

6th July 2010, 08:11
I don't know if this is applicable for you, but you can leave the default stretch factor. Just comment out addStretch(1) calls and notice that the behaviour changes. Though you still need to be careful with the width of the widget.

8th July 2010, 17:12
Thanks, I'll try that. For now I set the menu arrow width and height to 0 through styles, and then set the caption to "<caption>..." to indicate that it will open a menu.

Not as nice as using the arrow, but seems workable.