PDA

View Full Version : QListWidget (ModelBased) autosizing columns



rakkar
14th September 2009, 18:13
I thought this would be obvious but I can't find it.

I'm using a QListWidget (Model based) and want to make the columns automatically expand their width so none of the rows have to span multiple lines. This means not all columns will have the same width. This is only when the QListWidget is created, the user can change it later if they want.

What is the option for this?

Thanks.

negritot
14th September 2009, 20:47
Does QTableView::resizeColumnsToContents() do what you want?

rakkar
14th September 2009, 22:30
Yes, thanks.