ui.
contentListView->setViewMode
(QListView::IconMode);
QList<QStandardItem*> *items = new QList<QStandardItem*> ();
QString qs
= ui.
searchLineEdit->text
();
*items = getItemsToDisplay(qs);
iStandardModel->appendColumn(*items);
//Setting the icon size
ui.
contentListView->setIconSize
(QSize(128,
128));
//Setting the model
ui.contentListView->setModel(iStandardModel);
ui.contentListView->setViewMode(QListView::IconMode);
iStandardModel = new QStandardItemModel(this);
QList<QStandardItem*> *items = new QList<QStandardItem*> ();
QString qs = ui.searchLineEdit->text();
*items = getItemsToDisplay(qs);
iStandardModel->appendColumn(*items);
//Setting the icon size
ui.contentListView->setIconSize(QSize(128, 128));
//Setting the model
ui.contentListView->setModel(iStandardModel);
To copy to clipboard, switch view to plain text mode
In ui_GUIClass.h:
public:
public:
QListView *contentListView;
To copy to clipboard, switch view to plain text mode
In GUIClass.h:
public:
public:
QStandardItemModel* iStandardModel;
To copy to clipboard, switch view to plain text mode
The result is in attached sample.jpg.
Hope, this helps.
Bookmarks