Commit ef7f34de authored by hjk's avatar hjk

FancyMainWindow: Delay auto-collapsing of headers

Instead of leaving the header, use leaving of the dockwidget itself
as trigger.

Change-Id: I7df46e5ef1c01e55c8c3dee837a55b473451153f
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 718dd00f
...@@ -199,13 +199,6 @@ public: ...@@ -199,13 +199,6 @@ public:
QWidget::enterEvent(event); QWidget::enterEvent(event);
} }
void leaveEvent(QEvent *event)
{
if (!q->isFloating())
setActive(false);
QWidget::leaveEvent(event);
}
void setActive(bool on) void setActive(bool on)
{ {
m_active = on; m_active = on;
...@@ -311,6 +304,10 @@ void DockWidget::enterEvent(QEvent *event) ...@@ -311,6 +304,10 @@ void DockWidget::enterEvent(QEvent *event)
void DockWidget::leaveEvent(QEvent *event) void DockWidget::leaveEvent(QEvent *event)
{ {
if (!isFloating()) {
m_timer.stop();
m_titleBar->setActive(false);
}
QApplication::instance()->removeEventFilter(this); QApplication::instance()->removeEventFilter(this);
QDockWidget::leaveEvent(event); QDockWidget::leaveEvent(event);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment