From f51fb2b0b1e83047de4e95353d9e375d9318f1fc Mon Sep 17 00:00:00 2001 From: zeljko Date: Sat, 4 Aug 2007 12:43:45 +0000 Subject: [PATCH] (Qt): Fixed QPainter warning "QPainter::begin: Widget painting can only begin as a result of a paintEvent" when calling QtScreenContext for the first time. git-svn-id: trunk@11738 - --- lcl/interfaces/qt/qtobjects.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/qt/qtobjects.pas b/lcl/interfaces/qt/qtobjects.pas index 2c6f09f6a4..9b34f4fe0f 100644 --- a/lcl/interfaces/qt/qtobjects.pas +++ b/lcl/interfaces/qt/qtobjects.pas @@ -418,7 +418,7 @@ end; function QtScreenContext: TQtDeviceContext; begin if FScreenContext = nil then - FScreenContext := TQtDeviceContext.Create(QApplication_desktop(), True); + FScreenContext := TQtDeviceContext.Create(QApplication_desktop(), False); Result := FScreenContext; end; @@ -1092,7 +1092,7 @@ var H: Integer; begin {$ifdef VerboseQt} - WriteLn('TQtDeviceContext.Create ( WidgetHandle: ', dbghex(WidgetHandle), ' FromPaintEvent:',BoolToStr(FromPaintEvent),' )'); + WriteLn('TQtDeviceContext.Create ( WidgetHandle: ', dbghex(AWidget), ' FromPaintEvent:',BoolToStr(APaintEvent),' )'); {$endif} {NOTE FOR QT DEVELOPERS: Whenever you call TQtDeviceContext.Create() outside