Replace QAbstractItemView::viewOptions with initViewItemOption
This commit is contained in:
parent
0d5edd35ea
commit
e52cda193e
|
@ -230,7 +230,12 @@ QModelIndex GroupedIconView::indexAt(const QPoint &p) const {
|
|||
void GroupedIconView::paintEvent(QPaintEvent *e) {
|
||||
// This code was adapted from QListView::paintEvent(), changed to use the visualRect() of items, and to draw headers.
|
||||
|
||||
QStyleOptionViewItem option(viewOptions());
|
||||
QStyleOptionViewItem option;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
initViewItemOption(&option);
|
||||
#else
|
||||
option = viewOptions();
|
||||
#endif
|
||||
if (isWrapping())
|
||||
option.features = QStyleOptionViewItem::WrapText;
|
||||
option.locale = locale();
|
||||
|
|
Loading…
Reference in New Issue