1
0
Fork 0
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:
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(); 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();
} }