I have a QListView with IconMode view, LeftToRight flow, and wrapping is true.
But I have a problem when I resize the widget that the item is not relayout.
Is there any way to make it relayout? Many thanks for any help.
QListView icon mode not relayout when resize
You need to set the resize mode
setResizeMode(QListView::Adjust)
The default is "Fixed" not "Adjust"
Look here: https://doc.qt.io/qt-5/qlistview.html#resizeMode-prop
thanks for your help, I have another problem. I have 1000 data in my model, when it resize -> it really heavy. Is there anything to do to optimize it? –
Abundance
© 2022 - 2024 — McMap. All rights reserved.