PDA

View Full Version : Workaround for a Qt ui bug



eurodatar
5th July 2010, 16: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...

lyuts
6th July 2010, 07: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.

eurodatar
8th July 2010, 16: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.