Qt: set again immediate widget creation to darwin too, problem was with FOwnWidget which should be false anyway

when QMenuBar is constructed with known parent (form in this case), so qt will destroy it.

git-svn-id: trunk@34189 -
This commit is contained in:
zeljko 2011-12-14 17:56:50 +00:00
parent eb373f3a6a
commit e4f9a6fa22
2 changed files with 3 additions and 2 deletions

View File

@ -12733,6 +12733,7 @@ constructor TQtMenuBar.Create(const AParent: QWidgetH);
begin
Create;
Widget := QMenuBar_create(AParent);
FOwnWidget := AParent = nil;
FWidgetDefaultFont := TQtFont.Create(QWidget_font(Widget));
FWidgetLCLFont := nil;
FHeight := getHeight;

View File

@ -158,7 +158,7 @@ begin
{$endif}
// Creates the window
{$IFDEF HASX11}
{$IFDEF UNIX}
if (QtVersionMajor = 4) and (QtVersionMinor >= 6) then
QCoreApplication_setAttribute(QtAA_ImmediateWidgetCreation, True);
{$ENDIF}
@ -201,7 +201,7 @@ begin
QtMainWindow.setPopupParent(AForm.PopupMode, PopupParent);
end;
{$IFDEF HASX11}
{$IFDEF UNIX}
if (QtVersionMajor = 4) and (QtVersionMinor >= 6) then
QCoreApplication_setAttribute(QtAA_ImmediateWidgetCreation, False);
{$ENDIF}