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):
instead of this layout:
I 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:
and when the layout is ok:
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:
Alternatively, 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://email@example.com/2009-07/00423/Re-(Qt-interest)-setUnifiedTitleAndToolBarOnMac-and-Cocoa-Qt-cause-problems.html
After I removed resize/move from my window constructor, the layout is fine !