summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-03-24 10:04:45 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-03-24 10:04:45 (GMT)
commit07696ec4844e6eb9b9aec58a381d9c0f9403e7c2 (patch)
tree3fddf1e0bd2ae7271197c87f1cfbe89f2732da85
parent4e3ddb46e28f05b784c4cffec146c3f2306a3db8 (diff)
downloadQt-07696ec4844e6eb9b9aec58a381d9c0f9403e7c2.zip
Qt-07696ec4844e6eb9b9aec58a381d9c0f9403e7c2.tar.gz
Qt-07696ec4844e6eb9b9aec58a381d9c0f9403e7c2.tar.bz2
add the Qt::WA_AcceptTouchEvents attribute
this attribute must be set for a widget to get touch events (otherwise the widget will only get mouse events).
-rw-r--r--doc/src/qnamespace.qdoc5
-rw-r--r--src/corelib/global/qnamespace.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc
index 6220795..07972af 100644
--- a/doc/src/qnamespace.qdoc
+++ b/doc/src/qnamespace.qdoc
@@ -1192,6 +1192,11 @@
on Mac when using Carbon. This attribute has no effect on Cocoa.
The attribute is off by default and can be enabled on a per-window basis.
+ \value WA_AcceptTouchEvents Allows touch events (see QTouchEvent)
+ to be sent to the widget. Must be set on all widgets that can
+ handle touch events. Without this attribute set, events from a
+ touch device will be sent as mouse events.
+
\omitvalue WA_SetLayoutDirection
\omitvalue WA_InputMethodTransparent
\omitvalue WA_WState_CompressKeys
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index fb7fa0c..193c5dc 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -485,6 +485,8 @@ public:
WA_WState_WindowOpacitySet = 119, // internal
WA_TranslucentBackground = 120,
+ WA_AcceptTouchEvents = 121,
+
// Add new attributes before this line
WA_AttributeCount
};