Weird toolbar layout on mac os
-
I have a weird toolbar layout problem on mac os x... When I launch my application, I sometime get this layout (it happens randomly, one launch out of two or three):
http://uppix.net/3/5/9/cddf8c25cacaa47b9659436c006c5.jpginstead of this layout:
http://uppix.net/6/9/c/c894f0199cc96af5cc1ca2b642113.jpgI create and add my toolbar only once, inside MainWindow::MainWindow().
When I compile and run my application on Windows, I don't have this problem at all.Any idea ?
-
Can not access the images you have posted?
-
Here's the buggy layout:
http://www.divideconcept.net/dump/screenmacbug.jpgand when the layout is ok:
http://www.divideconcept.net/dump/screenmacok.jpg -
Looks like you have tried to enable the unified toolbar on mac with a style that does not work with it.
Make sure you did not enable this:
http://doc.qt.nokia.com/latest/qmainwindow.html#unifiedTitleAndToolBarOnMac-propAlternatively, you could try not to set a custom style on your application.
-
I don't use unified toolbar; however I use style "Plastique" and custom stylesheets.
-
Unfortunately forcing unified toolbar to false doesn't change the problem...
-
Problem found !
It is not due to style/stylesheets, but to the fact that you musn't resize/move your windows before show() is called.
Someone has the same probleme here: http://www.archivum.info/qt-interest@trolltech.com/2009-07/00423/Re-(Qt-interest)-setUnifiedTitleAndToolBarOnMac-and-Cocoa-Qt-cause-problems.htmlAfter I removed resize/move from my window constructor, the layout is fine !