QListView IconMode - content problem
Solved
General and Desktop
-
Hey guys,
I have created a QListView and gave it the following settings:
_listView = new QListView;
_listView->setViewMode(QListView::IconMode);
_listView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
_listView->setFlow(QListView::LeftToRight);Then i created a new QStandardItemModel and set the ListView Model to the new one.
After this i wanted to test it with this:for(int i = 0; i < 10; i++)
{
model->appendRow(new QStandardItem(QIcon("images/no.jpg"), "SomeTestText"));
}Here is my result:
now my question:
Why isn't it filling the grid until the end ?
Which setting am i missing here ?Thanks for reading so far.
-
Hi
try to add
ui->theview->setResizeMode(QListView::Adjust);