forked from qt-creator/qt-creator
QuickToolBars: fix cursor on Mac OS X
We have to set the cursor on Mac OS X manually in enter and leave events. Task-number: QTCREATORBUG-2622 Reviewed-by: Kai Koehne
This commit is contained in:
@@ -165,6 +165,20 @@ void DragWidget::protectedMoved()
|
||||
|
||||
}
|
||||
|
||||
void DragWidget::leaveEvent(QEvent *)
|
||||
{
|
||||
#ifdef Q_WS_MAC
|
||||
unsetCursor();
|
||||
#endif
|
||||
}
|
||||
|
||||
void DragWidget::enterEvent(QEvent *)
|
||||
{
|
||||
#ifdef Q_WS_MAC
|
||||
setCursor(Qt::ArrowCursor);
|
||||
#endif
|
||||
}
|
||||
|
||||
ContextPaneWidget::ContextPaneWidget(QWidget *parent) : DragWidget(parent), m_currentWidget(0)
|
||||
{
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
@@ -208,6 +222,9 @@ ContextPaneWidget::ContextPaneWidget(QWidget *parent) : DragWidget(parent), m_cu
|
||||
m_disableAction->setCheckable(true);
|
||||
connect(m_disableAction.data(), SIGNAL(toggled(bool)), this, SLOT(onDisable(bool)));
|
||||
m_pinned = false;
|
||||
#ifdef Q_WS_MAC
|
||||
setCursor(Qt::ArrowCursor);
|
||||
#endif
|
||||
}
|
||||
|
||||
ContextPaneWidget::~ContextPaneWidget()
|
||||
|
||||
Reference in New Issue
Block a user