Qt: 4.6.2 Commercial
Windows XP

My QListView is not showing all the items in the model even when scrolling to the end. The only way to see all items is to enlarge the window (QDockWidget) to the point beyond where the scrollbar goes away.

I've not seen anything like this mentioned in the posts here, so I believe there is some setup requirement for QListView that I am not using. Has anyone seen anything like this?

How can I get the view to display all my icons in the model?

I'm using a QListView (in IconMode) which is being fed by a QStandardModel, very simple.

Qt Code:
  1. setIconSize( QSize( 32, 32 ) );
  2. setViewMode( QListView::IconMode );
  3. setGridSize( QSize( 100, 80 ) );
  4. setResizeMode( QListView::Adjust );
  5. setSelectionRectVisible( true );
  6. setSpacing( 40 );
  7. setFont( QFont( "Tahoma", 8.25 ) );
  8. setVerticalScrollMode( QAbstractItemView::ScrollPerItem );
  9.  
  10. // NOTE: the dragDropMode must be set AFTER the viewMode!!!
  11. setDragEnabled( true );
  12. setDragDropMode( QAbstractItemView::DragOnly );
  13. setSelectionMode( QAbstractItemView::ExtendedSelection );
To copy to clipboard, switch view to plain text mode 

Loading the model:

Qt Code:
  1. QStandardItem* pItem = new QStandardItem( sDevName );
  2. pItem->setToolTip( sDevName );
  3. pItem->setData( QVariant( icon ), Qt::DecorationRole );
  4. pItem->setData( QVariant( sCategory ), DEVDATA_CATEGORY );
  5. pItem->setData( QVariant( sDeviceDCID ), DEVDATA_DCID );
  6. m_pDevLibModel->appendRow( pItem );
To copy to clipboard, switch view to plain text mode