Answer the question
In order to leave comments, you need to log in
How to set height for QListWidget?
There is a form on it QLineEdit and QListWidget placed in QVBoxLayout, sizePolicy fixed for QListWidget and method QSize sizeHint() const overridden;
QSize CommandListWidget::sizeHint() const
{
return QSize(1, 1);
}
Answer the question
In order to leave comments, you need to log in
Try setting a minimum size for the widget:list.setMinimumSize(QSize(1, 1));
If there are more items in the list than the visible area, it is better not to use QListWidget, QTableWidget but only QListView and QTableView
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question