mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-18 08:56:10 -04:00
Init style in Qt6-compatible way
This commit is contained in:
parent
0de635dcdc
commit
0b3ba26d86
@ -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…
x
Reference in New Issue
Block a user