I think QListView isn't designed too look like that. There is a hackish way to achieve it with a QListView (1), but I'd try with QTreeView (2) instead.
Hackish solution 1:
Override QListWidget::resizeEvent() and make the width of QListView::gridSize() to follow the width of the widget/viewport.
Better solution 2:
A single column QTreeView (or QTreeWidget if you prefer the convenience views) stretches the column to be like that. Hide the header, disable root decoration and add only top level items and voila!






Reply With Quote
Bookmarks