I have a QListWidget inside a QDockWidget which shows some icons. The iconSize is set to (60, 50), and so is the gridSize. The central widget is a QGraphicsView.

If I don't call setSizePolicy on this QListWidget, the dock will take almost all the horizontal space and the QGraphicsView will use its minimum size.

What I would like to know is if there's any way to specify the default width of the QListWidget/QDockWidget in pixels or in number of icons. What should I use for that? sizeHint, minimumSize, resize, minimumSizeHint? Besides, how does the QListWidget or QDockWidget calculate its default size?

Thanks in advance.