mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 22:45:38 +00:00
Init style in Qt6-compatible way
This commit is contained in:
parent
0de635dcdc
commit
0b3ba26d86
1 changed files with 5 additions and 0 deletions
|
@ -22,7 +22,12 @@ int CSVWidget::CompleterPopup::sizeHintForRow(int row) const
|
||||||
|
|
||||||
ensurePolished();
|
ensurePolished();
|
||||||
QModelIndex index = model()->index(row, modelColumn());
|
QModelIndex index = model()->index(row, modelColumn());
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
QStyleOptionViewItem option;
|
||||||
|
initViewItemOption(&option);
|
||||||
|
#else
|
||||||
QStyleOptionViewItem option = viewOptions();
|
QStyleOptionViewItem option = viewOptions();
|
||||||
|
#endif
|
||||||
QAbstractItemDelegate* delegate = itemDelegate(index);
|
QAbstractItemDelegate* delegate = itemDelegate(index);
|
||||||
return delegate->sizeHint(option, index).height();
|
return delegate->sizeHint(option, index).height();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue