From 83c9d3ccd2455ae811096f3776b5d8c25a6b5569 Mon Sep 17 00:00:00 2001 From: zeljko Date: Thu, 4 Sep 2008 16:53:11 +0000 Subject: [PATCH] Qt: bugfix - fixed child control selection/rubber paint inside TPanel during design time. git-svn-id: trunk@16413 - --- lcl/interfaces/qt/qtwidgets.pas | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lcl/interfaces/qt/qtwidgets.pas b/lcl/interfaces/qt/qtwidgets.pas index 12d68d1361..56424c871e 100644 --- a/lcl/interfaces/qt/qtwidgets.pas +++ b/lcl/interfaces/qt/qtwidgets.pas @@ -156,6 +156,7 @@ type procedure ShowMinimized; procedure ShowMaximized; function getActionByIndex(AIndex: Integer): QActionH; + function getAutoFillBackground: Boolean; function getClientBounds: TRect; virtual; function getClientOffset: TPoint; virtual; function getEnabled: Boolean; @@ -1361,6 +1362,11 @@ begin setAttribute(QtWA_NoMousePropagation, True); end; + if (csDesigning in LCLObject.ComponentState) and not + (Self is TQtMainWindow) and not + getAutoFillBackground then + setAutoFillBackground(False); + // Set mouse move messages policy QWidget_setMouseTracking(Widget, True); end; @@ -2658,6 +2664,11 @@ begin Result := nil; end; +function TQtWidget.getAutoFillBackground: Boolean; +begin + Result := QWidget_autoFillBackground(Widget); +end; + function TQtWidget.getEnabled: Boolean; begin Result := QWidget_isEnabled(Widget);