Set an override cursor for the whole application.
This commit is contained in:
parent
25a61d07a5
commit
eac6b4f983
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
// Qt
|
// Qt
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QGuiApplication>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
@ -134,7 +135,7 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in
|
|||||||
rect.adjust( 0, 0, -1, -1 );
|
rect.adjust( 0, 0, -1, -1 );
|
||||||
|
|
||||||
|
|
||||||
setCursor( Qt::ArrowCursor);
|
QGuiApplication::restoreOverrideCursor();
|
||||||
if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection
|
if ( selectionMode() != QAbstractItemView::NoSelection && // no hover without selection
|
||||||
m_hoveredIndex.isValid() &&
|
m_hoveredIndex.isValid() &&
|
||||||
index == m_hoveredIndex )
|
index == m_hoveredIndex )
|
||||||
@ -144,7 +145,7 @@ PartitionBarsView::drawSection( QPainter* painter, const QRect& rect_, int x, in
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
painter->setBrush( color );
|
painter->setBrush( color );
|
||||||
setCursor( Qt::ForbiddenCursor );
|
QGuiApplication::setOverrideCursor( Qt::ForbiddenCursor );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user