summaryrefslogtreecommitdiffstats
path: root/examples/widgets/layouts/flowlayout
diff options
context:
space:
mode:
authorQiang Li <liqianga@uniontech.com>2021-03-03 19:26:27 +0800
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-05-31 20:32:35 +0200
commitc6803b0ef71278e68c371158db368d59ab198bc1 (patch)
treed26ac9c3470522e8670c74beba759a5c7b3d0d0e /examples/widgets/layouts/flowlayout
parentd6181cc7044f0d198bbd2a5c3aec3d162006da91 (diff)
Fix the crashes when animated QTreeWidgetItems are hidden
QTreeView's drawTree implementation performs lazy layouting when calling itemDecorationAt. If animations are enabled, this can change the list of items, and invalidate the copy made earlier. Don't copy the list of items, use a reference instead so that code iterating over the items later operates on valid data. Add an assert in the private itemHeight method, it must not be called with an index that is out of bounds. Fixes: QTBUG-42469 Change-Id: Ifdb782881447912e00baffd1c407de10a1d8d0d4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f140ef04a0c54c2c8a699db33433b8d7235d137c)
Diffstat (limited to 'examples/widgets/layouts/flowlayout')
0 files changed, 0 insertions, 0 deletions