Hi,
I made class inherit from QListWidget and overrride resizeEvent:

Qt Code:
  1. void ImageList::resizeEvent(QResizeEvent *event)
  2. {
  3. QListWidget::resizeEvent(event);
  4.  
  5. int width = event->size().width() / columnNumber - 10;
  6. setIconSize(QSize(width, width));
  7. setGridSize(iconSize());
  8. }
To copy to clipboard, switch view to plain text mode 

But sometimes when I resize the widget by splitter, the application crash with this message:

QPainter::begin: Paint device returned engine == 0, type: 2
What is the proper way to change iconSize and gridSize when user resize widget? I try to use BlockingQueuedConnection and emit signal to yourself, but this make dead lock.