diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-06-30 09:08:35 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-06-30 09:08:35 +0200 |
commit | 5112821a37ab749f758e354e84703df2d09d5471 (patch) | |
tree | 8f19ba6e7661109675b5e1e9b0ddae94b4c96d4f /src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc | |
parent | 5d2ea1d5e9d6e29a16d0e9333cfc2dc8e7c5b677 (diff) | |
parent | a3f686cf7cc14ff481b972b1170a7ff76d0e0fd0 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
.qmake.conf
src/qml/qml/qqmlengine.cpp
src/quick/items/qquickitemsmodule.cpp
tools/qml/main.cpp
Change-Id: Ida8daf6b4d7e675385f2f5514c446e52dedaf136
Diffstat (limited to 'src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc')
-rw-r--r-- | src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc b/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc index 25d98dbc0d..2a644cafff 100644 --- a/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc +++ b/src/qml/doc/src/cppintegration/interactqmlfromcpp.qdoc @@ -170,7 +170,10 @@ QMetaObject::invokeMethod(): \table \row +\li QML \li \snippet qml/qtbinding/functions-qml/MyItem.qml 0 +\row +\li C++ \li \snippet qml/qtbinding/functions-qml/main.cpp 0 \endtable @@ -195,6 +198,7 @@ QObject::connect(), so that the \c cppSlot() method is called whenever the \row \li \snippet qml/qtbinding/signals-qml/MyItem.qml 0 +\row \li \snippet qml/qtbinding/signals-qml/myclass.h 0 \codeline @@ -235,8 +239,10 @@ QVariant type: void cppSlot(const QVariant &v) { qDebug() << "Called the C++ slot with value:" << v; - QQuickItem *item = qobject_cast<QQuickItem*>(v.value<QObject*>()); - qDebug() << "Item dimensions:" << item->width() << item->height(); + QQuickItem *item = + qobject_cast<QQuickItem*>(v.value<QObject*>()); + qDebug() << "Item dimensions:" << item->width() + << item->height(); } }; |