fixed(bug4589):cursor status error

This commit is contained in:
shaojun 2019-10-25 11:12:27 +08:00
parent 5dee49cc30
commit 48661bd429

View File

@ -94,7 +94,9 @@ private:
void enterEvent(QEvent *) override
{
QApplication::setOverrideCursor(cursor());
if (QApplication::overrideCursor() && QApplication::overrideCursor()->shape() != cursor()) {
QApplication::setOverrideCursor(cursor());
}
}
void leaveEvent(QEvent *) override
@ -380,13 +382,12 @@ void MainWindow::enterEvent(QEvent *e)
{
QWidget::enterEvent(e);
if (cursor().shape() != Qt::ArrowCursor) {
QApplication::restoreOverrideCursor();
}
m_leaveDelayTimer->stop();
if (m_settings->hideState() != Show && m_panelShowAni->state() != QPropertyAnimation::Running)
m_expandDelayTimer->start();
if (QApplication::overrideCursor() && QApplication::overrideCursor()->shape() != Qt::ArrowCursor)
QApplication::restoreOverrideCursor();
}
void MainWindow::leaveEvent(QEvent *e)