diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-13 00:50:44 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-13 00:50:44 (GMT) |
commit | 50711dd7aa22052eff58431d9f4e95e1a688047e (patch) | |
tree | 748ba00ade4cb880739dd88990b5c827b312296a /tools | |
parent | 47760d59d57f548d5816ae43e456c86e01146491 (diff) | |
parent | d45c45432ccd0a74c67e70ce5fc3a09f35923c26 (diff) | |
download | Qt-50711dd7aa22052eff58431d9f4e95e1a688047e.zip Qt-50711dd7aa22052eff58431d9f4e95e1a688047e.tar.gz Qt-50711dd7aa22052eff58431d9f4e95e1a688047e.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (34 commits)
Fix TextEdit and TextInput input panel support for mode RSIP_OnMouseClickAndAlreadyFocused
Fix for graphics widget in the background stealing declarative item's focus
Fix broken benchmarks.
Possibly fix autotest
Correctly assign bool to variant properties
Improve Image docs. Move all fillMode image examples to fillMode
Flickable small API changes.
Reset the dragDropItem to 0 when the item dies while dragging on top it.
Avoid warning (and possible future crash) upon reload.
Don't pass sequential (QNetworkReply) to image reader, it doesn't work well enough.
Stop GIF handler claiming it can report Size for sequential devices,
Use raster graphicssystem for qml.app on OS X.
Add missing test, qdeclarativelayoutitem, to declarative.pro
Sorted the tests list in declarative.pro
Bail out early if the same target value is reassigned to a Behavior.
Correctly position any input method popups for TextInput.
Correctly resize TextInput in the presence of preedit text.
Apply signal handler changes immediately.
Remove unused image
Qt.widgets was removed, point to graphics layouts example
...
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qml/main.cpp | 8 | ||||
-rw-r--r-- | tools/qml/qmlruntime.cpp | 11 | ||||
-rw-r--r-- | tools/qml/qmlruntime.h | 2 |
3 files changed, 20 insertions, 1 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index fb687ac..003716e 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -184,7 +184,7 @@ int main(int argc, char ** argv) atexit(showWarnings); #endif -#if defined (Q_WS_X11) +#if defined (Q_WS_X11) || defined(Q_WS_MAC) //### default to using raster graphics backend for now bool gsSpecified = false; for (int i = 0; i < argc; ++i) { @@ -231,6 +231,7 @@ int main(int argc, char ** argv) bool stayOnTop = false; bool maximized = false; bool useNativeFileBrowser = true; + bool experimentalGestures = false; WarningsConfig warningsConfig = DefaultWarnings; bool sizeToView = true; @@ -334,6 +335,8 @@ int main(int argc, char ** argv) sizeToView = false; } else if (arg == "-sizerootobjecttoview") { sizeToView = true; + } else if (arg == "-experimentalgestures") { + experimentalGestures = true; } else if (arg[0] != '-') { fileName = arg; } else if (1 || arg == "-help") { @@ -403,6 +406,9 @@ int main(int argc, char ** argv) } #endif + if (experimentalGestures) + viewer->enableExperimentalGestures(); + foreach (QString lib, imports) viewer->addLibraryPath(lib); 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)) diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h index 9551090..b021d0d 100644 --- a/tools/qml/qmlruntime.h +++ b/tools/qml/qmlruntime.h @@ -112,6 +112,8 @@ public: QDeclarativeView *view() const; LoggerWidget *warningsWidget() const; + void enableExperimentalGestures(); + public slots: void sceneResized(QSize size); bool open(const QString&); |