SOLVED!
My QListView sub-class constructor called setSpacing( 40 ) after calling setGridSize(). While I'm not sure why this upset the normal scrolling of the view, the calls clearly were interfering with each other. Commenting out the setSpacing() call solved the problem.
{
setIconSize
( QSize( 32,
32 ) );
setGridSize
( QSize( 100,
80 ) );
setSelectionRectVisible( true );
//setSpacing( 40 );
setFont
( QFont( "Tahoma",
8.25 ) );
// NOTE: the dragDropMode must be set AFTER the viewMode!!!
setDragEnabled( true );
}
DevLibView::DevLibView( QWidget* pParent ) : QListView( pParent )
{
setViewMode( QListView::IconMode );
setIconSize( QSize( 32, 32 ) );
setGridSize( QSize( 100, 80 ) );
setResizeMode( QListView::Adjust );
setSelectionRectVisible( true );
//setSpacing( 40 );
setFont( QFont( "Tahoma", 8.25 ) );
// NOTE: the dragDropMode must be set AFTER the viewMode!!!
setDragEnabled( true );
setDragDropMode( QAbstractItemView::DragOnly );
setSelectionMode( QAbstractItemView::ExtendedSelection );
}
To copy to clipboard, switch view to plain text mode
The view now scrolls as expected (without having to add a layout to my tab widget)!
Thank you wysota and Gh0str1d3r for your time and suggestions.
Bookmarks