From 9ecd23dfc759e5cfeb792a9314346900c6b14a42 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Tue, 16 Feb 2016 14:45:50 +0100 Subject: [PATCH] In the labels view too. --- src/modules/partition/gui/PartitionLabelsView.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/partition/gui/PartitionLabelsView.cpp b/src/modules/partition/gui/PartitionLabelsView.cpp index 920c80800..a300a9f24 100644 --- a/src/modules/partition/gui/PartitionLabelsView.cpp +++ b/src/modules/partition/gui/PartitionLabelsView.cpp @@ -31,6 +31,7 @@ #include // Qt +#include #include #include @@ -558,6 +559,11 @@ PartitionLabelsView::mouseMoveEvent( QMouseEvent* event ) else m_hoveredIndex = QModelIndex(); + if ( !canBeSelected( m_hoveredIndex ) ) + QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor ); + else + QGuiApplication::restoreOverrideCursor(); + viewport()->repaint(); } @@ -565,6 +571,7 @@ PartitionLabelsView::mouseMoveEvent( QMouseEvent* event ) void PartitionLabelsView::leaveEvent( QEvent* event ) { + QGuiApplication::restoreOverrideCursor(); if ( m_hoveredIndex.isValid() ) { m_hoveredIndex = QModelIndex();