PDA

View Full Version : MainWindow Menu bug in Qt 4.2.3?



No-Nonsense
10th March 2007, 10:28
I switched to Qt 4.2.3 from Qt 4.2.2 yesterday and my Qt Designer build QMainWindow application now has a severe bug with the menu. I attached two screenshots showing the problem with both languages my app supports:
There is a small line above the menu. Below this line the menu items are not clickable. As a workaround to access File / Edit you have to click a menu item that is on the right from that line and then move the mouse left so that the menu switches to the leftnext menu.

Previewing the MainWindow in Qt Designer does not show this line and behaviour. Another app and QDevelop that I both build with Qt 4.2.3 do not show this either.

Any ideas what could cause this issue?

Thanks in advance,
-Jens

BartSimpson
10th March 2007, 20:50
I have the same Problem, but I looks different at me.
When I start the designer than no menu bar is shown. And all fonts are miss sized. Some are extreme big and other are extreme small. This only happened, when you build Qt4 on Windows with the Platform SDK 6(alias vista SDK) when using the old version 5 all is ok.

wysota
10th March 2007, 22:16
My Linux 4.2.3 build doesn't experience any of the behaviours you describe, although my application has a single drop down menu. I doubt that is the problem though... Can you prepare a minimal compilable example reproducing the problem?

ChristianEhrlicher
11th March 2007, 08:44
Imho no need for a testcase - it really only happens with the vista sdk... :(
See also http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=150711

No-Nonsense
11th March 2007, 11:47
There is a small line above the menu. Below this line the menu items are not clickable. As a workaround to access File / Edit you have to click a menu item that is on the right from that line and then move the mouse left so that the menu switches to the leftnext menu.

I could solve my problem by removing step by step parts of my MainWindow's constructor. The small bar and the resulting problems were created by my ::readSettings() method that restores the forms settings.

It must been either created by restoreGeometry(...) or restoreState(...) that restored the MainForm's state saved with the old Qt 4.2.2.
After deleting the MainForm's settings from the registry the problem solved.

To prevent this bug in further versions of my app I am thinking of storing the Qt build-time and run-time versions in my apps settings and to delete all Form related stuff when the versions changed (QT_VERSION_STR // Qt version (build) and qVersion() // Qt version (runtime)).

-Jens