diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-11-23 01:35:33 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-11-23 01:35:33 (GMT) |
commit | 7d17956316ac786516f67ba9be511975ff42d898 (patch) | |
tree | 7d5e4a31c710131742921f0dbce8fbd4285d99f5 /doc/src | |
parent | 280f67d16430ce0dcfcc31a0c88ce7156126066c (diff) | |
parent | e158714ea545bd74600f121ab726cf2cf848f3b9 (diff) | |
download | Qt-7d17956316ac786516f67ba9be511975ff42d898.zip Qt-7d17956316ac786516f67ba9be511975ff42d898.tar.gz Qt-7d17956316ac786516f67ba9be511975ff42d898.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/declarative/integrating.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/qtbinding.qdoc | 3 | ||||
-rw-r--r-- | doc/src/declarative/whatsnew.qdoc | 10 | ||||
-rw-r--r-- | doc/src/frameworks-technologies/threads.qdoc | 9 | ||||
-rw-r--r-- | doc/src/getting-started/gettingstartedqml.qdoc | 17 | ||||
-rw-r--r-- | doc/src/snippets/code/doc_src_fdl.qdoc | 10 | ||||
-rw-r--r-- | doc/src/snippets/code/src_qtestlib_qtestcase.cpp | 16 | ||||
-rw-r--r-- | doc/src/snippets/declarative/loader/sizeitem.qml | 62 | ||||
-rw-r--r-- | doc/src/snippets/declarative/loader/sizeloader.qml | 62 |
9 files changed, 173 insertions, 18 deletions
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc index 682f792..7028585 100644 --- a/doc/src/declarative/integrating.qdoc +++ b/doc/src/declarative/integrating.qdoc @@ -47,7 +47,7 @@ qmlView->setSource(QUrl::fromLocalFile("myqml.qml")); QWidget *widget = myExistingWidget(); QVBoxLayout *layout = new QVBoxLayout(widget); -widget->addWidget(qmlView); +layout->addWidget(qmlView); \endcode The one drawback to this approach is that QDeclarativeView is slower to initialize diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc index 8a969eb..fb457be 100644 --- a/doc/src/declarative/qtbinding.qdoc +++ b/doc/src/declarative/qtbinding.qdoc @@ -448,7 +448,8 @@ now be used from QML: \snippet doc/src/snippets/declarative/qtbinding/enums/standalone.qml 0 The C++ type must be registered with QML to use its enums. If your C++ type is not instantiable, it -can be registered using qmlRegisterUncreatableType(). +can be registered using qmlRegisterUncreatableType(). To be accessible from QML, the names of enum values +must begin with a capital letter. See the \l {Tutorial: Writing QML extensions with C++}{Writing QML extensions with C++} tutorial and the \l {Extending QML in C++} reference documentation for more information. diff --git a/doc/src/declarative/whatsnew.qdoc b/doc/src/declarative/whatsnew.qdoc index f8d1d0e..df0e999 100644 --- a/doc/src/declarative/whatsnew.qdoc +++ b/doc/src/declarative/whatsnew.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/doc/src/frameworks-technologies/threads.qdoc b/doc/src/frameworks-technologies/threads.qdoc index 3ef617c..001b29d 100644 --- a/doc/src/frameworks-technologies/threads.qdoc +++ b/doc/src/frameworks-technologies/threads.qdoc @@ -459,11 +459,10 @@ \list - \o \l{Qt::AutoConnection}{Auto Connection} (default) The behavior - is the same as the Direct Connection, if the emitter and - receiver are in the same thread. The behavior is the same as - the Queued Connection, if the emitter and receiver are in - different threads. + \o \l{Qt::AutoConnection}{Auto Connection} (default) If the signal is + emitted in the thread which the receiving object has affinity then + the behavior is the same as the Direct Connection. Otherwise, + the behavior is the same as the Queued Connection." \o \l{Qt::DirectConnection}{Direct Connection} The slot is invoked immediately, when the signal is emitted. The slot is executed diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index c555627..54fa098 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -58,7 +58,12 @@ \image qml-texteditor5_editmenu.png - To run the QML example code, merely provide the included \l{QML Viewer}{qmlviewer} + The final source code is in the \c{examples/tutorials/gettingStarted/gsQml} + directory. You may need to compile the C++ plugin in the + \c{examples/tutorials/gettingStarted/gsQml/} first. This will put the + C++ plugin in a directory where the QML files may find it. + + To launch the text editor, merely provide the included \l{QML Viewer}{qmlviewer} tool with the QML file as the argument. The C++ portion of this tutorial assumes that the reader possesses basic knowledge of Qt's compilation procedures. @@ -1005,4 +1010,14 @@ The application can function as a simple text editor, able to accept text and save the text into a file. The text editor can also load from a file and perform text manipulation. + + \section1 Running the Text Editor + + We need to compile the file dialog C++ plugin before the text editor can run. + To compile, enter the \c gsQml directory, then run \c qmake and compile + using \c make or \c nmake, depending on your platform. To run, launch + qmlviewer and open the \c texteditor.qml file. + + The source code is in the \c{examples/tutorials/gettingStarted/gsQml} + directory. */ diff --git a/doc/src/snippets/code/doc_src_fdl.qdoc b/doc/src/snippets/code/doc_src_fdl.qdoc index 3c15dfe..b55e663 100644 --- a/doc/src/snippets/code/doc_src_fdl.qdoc +++ b/doc/src/snippets/code/doc_src_fdl.qdoc @@ -7,11 +7,11 @@ ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ -** Commercial Usage -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Nokia. +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Free Documentation License ** Alternatively, this file may be used under the terms of the GNU Free diff --git a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp index 6ae8939..adb0c34 100644 --- a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp +++ b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp @@ -230,5 +230,21 @@ widget.show(); QTest::qWaitForWindowShown(&widget); //! [24] +//! [25] +QWidget widget; + +QTest::touchEvent(&widget) + .press(0, QPoint(10, 10)); +QTest::touchEvent(&widget) + .stationary(0) + .press(1, QPoint(40, 10)); +QTest::touchEvent(&widget) + .move(0, QPoint(12, 12)) + .move(1, QPoint(45, 5)); +QTest::touchEvent(&widget) + .release(0) + .release(1); +//! [25] + } diff --git a/doc/src/snippets/declarative/loader/sizeitem.qml b/doc/src/snippets/declarative/loader/sizeitem.qml new file mode 100644 index 0000000..6ace8d6 --- /dev/null +++ b/doc/src/snippets/declarative/loader/sizeitem.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +//![0] +import QtQuick 1.0 + +Item { + width: 200; height: 200 + + Loader { + // position the Loader in the center of the parent + anchors.centerIn: parent + sourceComponent: rect + } + + Component { + id: rect + Rectangle { + width: 50 + height: 50 + color: "red" + } + } +} +//![0] diff --git a/doc/src/snippets/declarative/loader/sizeloader.qml b/doc/src/snippets/declarative/loader/sizeloader.qml new file mode 100644 index 0000000..eac7d57 --- /dev/null +++ b/doc/src/snippets/declarative/loader/sizeloader.qml @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +//![0] +import QtQuick 1.0 + +Item { + width: 200; height: 200 + + Loader { + // Explicitly set the size of the Loader to the parent item's size + anchors.fill: parent + sourceComponent: rect + } + + Component { + id: rect + Rectangle { + width: 50 + height: 50 + color: "red" + } + } +} +//![0] |