summaryrefslogtreecommitdiffstats
path: root/tools/qml/qmlruntime.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-05-10 23:01:51 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-05-11 22:42:19 (GMT)
commit797d44e7415e8f9d582dd2838957cf309cea9449 (patch)
tree068c8e07583be14c955e4f1eab84ff2e65794485 /tools/qml/qmlruntime.cpp
parent1809eb091cb47c914713ecef6e514e912a4e113b (diff)
downloadQt-797d44e7415e8f9d582dd2838957cf309cea9449.zip
Qt-797d44e7415e8f9d582dd2838957cf309cea9449.tar.gz
Qt-797d44e7415e8f9d582dd2838957cf309cea9449.tar.bz2
Temporary work-around for QTBUG-9849.
May allow better experimentation and bug fixing.
Diffstat (limited to 'tools/qml/qmlruntime.cpp')
-rw-r--r--tools/qml/qmlruntime.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 06fa004..16b0ffb 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -501,6 +501,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
}
canvas = new QDeclarativeView(this);
+
canvas->setAttribute(Qt::WA_OpaquePaintEvent);
canvas->setAttribute(Qt::WA_NoSystemBackground);
@@ -550,6 +551,16 @@ QDeclarativeViewer::~QDeclarativeViewer()
delete namFactory;
}
+void QDeclarativeViewer::enableExperimentalGestures()
+{
+ canvas->viewport()->grabGesture(Qt::TapGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::TapAndHoldGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::PanGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::PinchGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::SwipeGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->setAttribute(Qt::WA_AcceptTouchEvents);
+}
+
int QDeclarativeViewer::menuBarHeight() const
{
if (!(windowFlags() & Qt::FramelessWindowHint))