Qt5: fixed bug with wrong mouse offset inside TGroupBox. issue #38659

git-svn-id: trunk@64866 -
This commit is contained in:
zeljko 2021-03-24 18:10:54 +00:00
parent e86f37adb5
commit 09c43715cf

View File

@ -787,7 +787,6 @@ type
function CanPaintBackground: Boolean; override;
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; override;
function getClientBounds: TRect; override;
function getClientOffset: TPoint; override;
function getText: WideString; override;
procedure preferredSize(var PreferredWidth, PreferredHeight: integer;
{%H-}WithThemeSpace: Boolean); override;
@ -8284,15 +8283,6 @@ begin
end;
end;
function TQtGroupBox.getClientOffset: TPoint;
begin
Result:=inherited getClientOffset;
// issue #28155
// there's no client offset since FCentralWidget is at it's position 0,0
if testAttribute(QtWA_Mapped) and QWidget_testAttribute(FCentralWidget, QtWA_Mapped) then
Result := Point(0, 0);
end;
function TQtGroupBox.getClientBounds: TRect;
var
R, R1: TRect;