mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-22 01:44:49 -05:00
Fix SetHeightToContentHeight() not respecting diffrently sized rows
This commit is contained in:
parent
510f83246e
commit
b3b2114c45
|
|
@ -64,8 +64,12 @@ void SetHeightToContentHeight(QListWidget *list)
|
|||
}
|
||||
|
||||
int scrollBarHeight = getHorizontalScrollBarHeight(list);
|
||||
int height = (list->sizeHintForRow(0) + list->spacing()) * nrItems +
|
||||
2 * list->frameWidth() + scrollBarHeight;
|
||||
int height = 2 * list->frameWidth() + scrollBarHeight;
|
||||
|
||||
for (int i = 0; i < nrItems; i++) {
|
||||
height += (list->sizeHintForRow(i) + list->spacing());
|
||||
}
|
||||
|
||||
list->setMinimumHeight(height);
|
||||
list->setMaximumHeight(height);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user