1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 09:45:36 +00:00

Init style in Qt6-compatible way

This commit is contained in:
Andrei Kortunov 2023-01-15 18:23:21 +04:00
parent 0de635dcdc
commit 0b3ba26d86

View file

@ -22,7 +22,12 @@ int CSVWidget::CompleterPopup::sizeHintForRow(int row) const
ensurePolished();
QModelIndex index = model()->index(row, modelColumn());
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QStyleOptionViewItem option;
initViewItemOption(&option);
#else
QStyleOptionViewItem option = viewOptions();
#endif
QAbstractItemDelegate* delegate = itemDelegate(index);
return delegate->sizeHint(option, index).height();
}