ThumbnailView::ThumbnailView( QWidget* parent ) : QListView( parent ) { setMovement( QListView::Static ); setFrameStyle(QFrame::NoFrame); connect( this, SIGNAL(pressed(QModelIndex)), this, SLOT(emitSelected(QModelIndex)) ); }
ThumbnailView::ThumbnailView( QWidget* parent ) : QListView( parent ) { QDesktopWidget *desktop = QApplication::desktop(); resize(desktop->availableGeometry(desktop->screenNumber(this)).width(), height()); //### workaround to make view layout properly on first view. setMovement( QListView::Static ); setFrameStyle(QFrame::NoFrame); connect( this, SIGNAL(pressed(QModelIndex)), this, SLOT(emitSelected(QModelIndex)) ); }