Skip to content
Permalink
Browse files
QTreeView::viewOptions() doesn't exist in qt 6
  • Loading branch information
nyalldawson committed Jul 20, 2021
1 parent ea43f6b commit 6d7d7ccbde67303e378c8b59b1cd5b4b2486cd6b
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gui/layertree/qgslayertreeviewitemdelegate.cpp
@@ -204,7 +204,12 @@ void QgsLayerTreeViewItemDelegate::onClicked( const QModelIndex &index )
if ( indicators.isEmpty() )
return;

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QStyleOptionViewItem opt( mLayerTreeView->viewOptions() );
#else
QStyleOptionViewItem opt;
mLayerTreeView->initViewItemOption( &opt );
#endif
opt.rect = mLayerTreeView->visualRect( index );
initStyleOption( &opt, index );
_fixStyleOption( opt );

0 comments on commit 6d7d7cc

Please sign in to comment.