Quote Originally Posted by scwizard View Post
In native windows API when you select an item from a listbox window the width of the selection highlighting is as wide as the listbox.

In a QListWidget, when you select an item the selection highlighting is only as wide as the text.

Is there anyway I can change the style of a QListWidget to make it look more like a windows listbox?

Here's exactly what I'm talking about
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!