Qt: do not show menubar for empty menus from child forms on macosx.

git-svn-id: trunk@34186 -
This commit is contained in:
zeljko 2011-12-14 17:13:29 +00:00
parent 53aba472a1
commit 8d9b107ca7

View File

@ -5446,8 +5446,20 @@ begin
end;
// Main menu bar
{$IFDEF DARWIN}
// do not show menubar for empty menus
if (QtVersionMajor = 4) and (QtVersionMinor >= 6) then
QCoreApplication_setAttribute(QtAA_DontUseNativeMenuBar,
not Assigned(TCustomForm(LCLObject).Menu));
{$ENDIF}
MenuBar := TQtMenuBar.Create(Result);
{$IFDEF DARWIN}
if (QtVersionMajor = 4) and (QtVersionMinor >= 6) then
QCoreApplication_setAttribute(QtAA_DontUseNativeMenuBar, False);
{$ENDIF}
FCentralWidget := QWidget_create(Result);
QWidget_setMouseTracking(FCentralWidget, True);