mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:29:28 +02:00
Qt5: Fixed AV when changing TListView.ViewStyle in design time. Issue #39353
This commit is contained in:
parent
2473e77422
commit
63ca7a9ace
@ -843,6 +843,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