mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 14:39:27 +02:00
Qt,Qt5: Fixed slowness with TListBox. issue #39311
This commit is contained in:
parent
81a1feb88d
commit
ce63f619fc
@ -455,6 +455,8 @@ begin
|
||||
else
|
||||
QtListWidget.setFrameShape(QFrameNoFrame);
|
||||
|
||||
QtListWidget.setUniformItemSizes(TCustomListBox(AWinControl).Style in [lbStandard, lbOwnerDrawFixed]);
|
||||
|
||||
QtListWidget.AttachEvents;
|
||||
|
||||
// create our FList helper
|
||||
@ -693,6 +695,7 @@ class procedure TQtWSCustomListBox.SetStyle(const ACustomListBox: TCustomListBox
|
||||
begin
|
||||
if not WSCheckHandleAllocated(ACustomListBox, 'SetStyle') then
|
||||
Exit;
|
||||
TQtListWidget(ACustomListBox.Handle).setUniformItemSizes(ACustomListBox.Style in [lbStandard, lbOwnerDrawFixed]);
|
||||
TQtListWidget(ACustomListBox.Handle).OwnerDrawn :=
|
||||
ACustomListBox.Style in [lbOwnerDrawFixed, lbOwnerDrawVariable];
|
||||
end;
|
||||
|
@ -457,6 +457,8 @@ begin
|
||||
else
|
||||
QtListWidget.setFrameShape(QFrameNoFrame);
|
||||
|
||||
QtListWidget.setUniformItemSizes(TCustomListBox(AWinControl).Style in [lbStandard, lbOwnerDrawFixed]);
|
||||
|
||||
QtListWidget.AttachEvents;
|
||||
|
||||
// create our FList helper
|
||||
@ -695,6 +697,7 @@ class procedure TQtWSCustomListBox.SetStyle(const ACustomListBox: TCustomListBox
|
||||
begin
|
||||
if not WSCheckHandleAllocated(ACustomListBox, 'SetStyle') then
|
||||
Exit;
|
||||
TQtListWidget(ACustomListBox.Handle).setUniformItemSizes(ACustomListBox.Style in [lbStandard, lbOwnerDrawFixed]);
|
||||
TQtListWidget(ACustomListBox.Handle).OwnerDrawn :=
|
||||
ACustomListBox.Style in [lbOwnerDrawFixed, lbOwnerDrawVariable];
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user