mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 07:50:20 +02:00
Qt: do not immediate create handles if we are under qt-4.5.XX otherwise forms aren't painted properly due to Qt bug.
git-svn-id: trunk@25814 -
This commit is contained in:
parent
987771a01f
commit
c640156c1a
@ -123,7 +123,7 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses QtWSControls;
|
||||
uses {$IFDEF HASX11}qtint,{$ENDIF} QtWSControls;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TQtWSCustomForm.CreateHandle
|
||||
@ -146,6 +146,7 @@ begin
|
||||
|
||||
// Creates the window
|
||||
{$IFDEF HASX11}
|
||||
if (QtVersionMajor = 4) and (QtVersionMinor >= 6) then
|
||||
QCoreApplication_setAttribute(QtAA_ImmediateWidgetCreation, True);
|
||||
{$ENDIF}
|
||||
if csDesigning in AWinControl.ComponentState then
|
||||
@ -188,6 +189,7 @@ begin
|
||||
end;
|
||||
|
||||
{$IFDEF HASX11}
|
||||
if (QtVersionMajor = 4) and (QtVersionMinor >= 6) then
|
||||
QCoreApplication_setAttribute(QtAA_ImmediateWidgetCreation, False);
|
||||
{$ENDIF}
|
||||
|
||||
@ -388,7 +390,8 @@ begin
|
||||
Widget.setVisible(AWinControl.HandleObjectShouldBeVisible);
|
||||
Widget.EndUpdate;
|
||||
{$IFDEF HASX11}
|
||||
if TForm(AWinControl).FormStyle <> fsMDIChild then
|
||||
if (QtVersionMajor = 4) and (QtVersionMinor >= 6)
|
||||
and (TForm(AWinControl).FormStyle <> fsMDIChild) then
|
||||
QApplication_syncX();
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user