mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 02:59:58 +02:00
Qt5,Qt6: fixed TListBox.TopIndex. issue #41688
This commit is contained in:
parent
cf1d97517f
commit
478688e0f1
@ -580,8 +580,17 @@ end;
|
||||
Returns: Nothing
|
||||
------------------------------------------------------------------------------}
|
||||
class function TQtWSCustomListBox.GetTopIndex(const ACustomListBox: TCustomListBox): integer;
|
||||
var
|
||||
QtListWidget: TQtListWidget;
|
||||
AQtPoint: TQtPoint;
|
||||
begin
|
||||
Result := 0;
|
||||
if not WSCheckHandleAllocated(ACustomListBox, 'GetTopIndex') then
|
||||
Exit;
|
||||
QtListWidget := TQtListWidget(ACustomListBox.Handle);
|
||||
AQtPoint.x := 0;
|
||||
AQtPoint.y := 0;
|
||||
Result := QtListWidget.IndexAt(@AQtPoint);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -580,8 +580,17 @@ end;
|
||||
Returns: Nothing
|
||||
------------------------------------------------------------------------------}
|
||||
class function TQtWSCustomListBox.GetTopIndex(const ACustomListBox: TCustomListBox): integer;
|
||||
var
|
||||
QtListWidget: TQtListWidget;
|
||||
AQtPoint: TQtPoint;
|
||||
begin
|
||||
Result := 0;
|
||||
if not WSCheckHandleAllocated(ACustomListBox, 'GetTopIndex') then
|
||||
Exit;
|
||||
QtListWidget := TQtListWidget(ACustomListBox.Handle);
|
||||
AQtPoint.x := 0;
|
||||
AQtPoint.y := 0;
|
||||
Result := QtListWidget.IndexAt(@AQtPoint);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user