mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 23:59:12 +02:00
Qt5: Fixed AV when changing TListView.ViewStyle in design time. Issue #39353
(cherry picked from commit 63ca7a9ace
)
This commit is contained in:
parent
75f7903c0d
commit
d767c1dcee
@ -841,6 +841,13 @@ begin
|
||||
exit(0);
|
||||
|
||||
QtTreeWidget := TQtTreeWidget(ALV.Handle);
|
||||
|
||||
{Issue #39353.Such scenario happens only when SetStyle() calls RecreateWnd
|
||||
while designing control.Default width for TListColumn is 50,
|
||||
unfortunatelly it''s hardcoded in listcolumn.inc.}
|
||||
if (csDesigning in ALV.ComponentState) and (QtTreeWidget.ColCount <> ALV.ColumnCount) then
|
||||
exit(50);
|
||||
|
||||
Result := QtTreeWidget.ColWidth[AIndex];
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user