I would like to adjust a QListView's width according to its content to let every item visible. The list is like:
...
setFlow(QListView::LeftToRight) ;
setLayoutMode(QListView::Batched);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setAutoScroll(false);
setUniformItemSizes(true);
setResizeMode(QListView::Adjust);
...
I tried different QSizePolicy and got really confused.