Commit b88df383 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

call touch when running inside a dtkApp

parent d78eb8e9
......@@ -13,6 +13,8 @@
// Code:
#include "dtkWidgetsWidget.h"
#include "dtkApplication.h"
#include "dtkWidgetsMainWindow.h"
dtkWidgetsWidget::dtkWidgetsWidget(QWidget *parent) : QWidget(parent)
{
......@@ -40,5 +42,14 @@ void dtkWidgetsWidget::mousePressEvent(QMouseEvent *event)
QWidget::mousePressEvent(event);
}
void dtkWidgetsWidget::showEvent(QShowEvent *event)
{
QWidget::showEvent(event);
// needed for mouse tracking propagation
if (qApp && dynamic_cast<dtkApplication*>(qApp))
dtkApp->window()->touch();
}
//
// dtkWidgetsWidget.cpp ends here
......@@ -39,6 +39,7 @@ public slots:
protected:
void mousePressEvent(QMouseEvent *);
void showEvent(QShowEvent *);
};
//
......
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