Call update() on the widget.
I did that at the beginning, but nothing happens.
I use qListWidget and populate it with QListWidgetItem and I want to rearrange items (scaled Images displayed as QIcons, I know that I should use delegates but I want to keep it as simple as possible) on window resize.
What would you expect to happen?
Please define "rearrange". How exactly do you do that in your code?I use qListWidget and populate it with QListWidgetItem and I want to rearrange items (scaled Images displayed as QIcons, I know that I should use delegates but I want to keep it as simple as possible) on window resize.
After importing images and scaling them, items ( items == images + description) are arranged depending on the widget size, i.e. when widget width is smaller then (2x item width + spacing) they arrange in one column but when I resize window (previous statement is true ) then I want them to rearrange into two (or more depending on the widget size ) columns. And calling doItemsLayout () do the trick.
Sorry for confusion, it's probably due to my poor eng, or not properly stated question.
Best regards
EDIT: also listWidget->setResizeMode( QListView::Adjust ); do the trick ... seriously I need some sleep.
Last edited by Talei; 2nd April 2010 at 10:22.
Bookmarks