(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 -
This commit is contained in:
zeljko 2007-08-04 12:43:45 +00:00
parent bcc6d8567f
commit f51fb2b0b1

View File

@ -418,7 +418,7 @@ end;
function QtScreenContext: TQtDeviceContext; function QtScreenContext: TQtDeviceContext;
begin begin
if FScreenContext = nil then if FScreenContext = nil then
FScreenContext := TQtDeviceContext.Create(QApplication_desktop(), True); FScreenContext := TQtDeviceContext.Create(QApplication_desktop(), False);
Result := FScreenContext; Result := FScreenContext;
end; end;
@ -1092,7 +1092,7 @@ var
H: Integer; H: Integer;
begin begin
{$ifdef VerboseQt} {$ifdef VerboseQt}
WriteLn('TQtDeviceContext.Create ( WidgetHandle: ', dbghex(WidgetHandle), ' FromPaintEvent:',BoolToStr(FromPaintEvent),' )'); WriteLn('TQtDeviceContext.Create ( WidgetHandle: ', dbghex(AWidget), ' FromPaintEvent:',BoolToStr(APaintEvent),' )');
{$endif} {$endif}
{NOTE FOR QT DEVELOPERS: Whenever you call TQtDeviceContext.Create() outside {NOTE FOR QT DEVELOPERS: Whenever you call TQtDeviceContext.Create() outside