diff --git a/lcl/interfaces/qt/qtwidgets.pas b/lcl/interfaces/qt/qtwidgets.pas index 42f30afde4..5c9e91f9c8 100644 --- a/lcl/interfaces/qt/qtwidgets.pas +++ b/lcl/interfaces/qt/qtwidgets.pas @@ -1596,8 +1596,14 @@ begin QPaintEvent_Rect(QPaintEventH(Event), ClipRect); end; + Msg.DC := BeginPaint(THandle(Self), AStruct^); FContext := Msg.DC; + + Msg.PaintStruct^.rcPaint := PaintData.ClipRect^; + Msg.PaintStruct^.hdc := FContext; + + with getClientBounds do SetWindowOrgEx(Msg.DC, -Left, -Top, nil);