hello, all,
I want to modify QListView item height or spacing between items. How to modify it?
qstyle? I don't find the property...
hello, all,
I want to modify QListView item height or spacing between items. How to modify it?
qstyle? I don't find the property...
Hi,
QListView is derived class of QWidget.
So you can use setFixedHeight ( int h ) i think..
Thanks,
Santhosh
How are you using QLIstView ?
If you are using model, you need to return size hint from the data() function of the model.
something like
if(role == Qt::sizeHintRole)
return QSize(width,height);
Can you show us some code of what u are doing ?
hard to say whats wrong without seeing more
Try this in the last resort:
Qt Code:
QListView listView; listView->setStyleSheet("QListView::item { height: 100px; }");To copy to clipboard, switch view to plain text mode
If you're using a delegate, try to override the sizeHint method.
Header:
Qt Code:
To copy to clipboard, switch view to plain text mode
Source:
Qt Code:
{ }To copy to clipboard, switch view to plain text mode
Bookmarks