summaryrefslogtreecommitdiffstats
path: root/doc/src/getting-started
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-09-10 18:04:39 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-09-10 18:04:39 (GMT)
commitb3981fd1f7b82742857c613af6dfbe41b5493577 (patch)
tree957b84d8f1792f9e5a43c879274469c4f07168ea /doc/src/getting-started
parente0ef11578048620b3f107b7a357fed3aade0d21e (diff)
parent72cc21e597f2d77ea1be3c1a3f7df36d8909d2fc (diff)
downloadQt-b3981fd1f7b82742857c613af6dfbe41b5493577.zip
Qt-b3981fd1f7b82742857c613af6dfbe41b5493577.tar.gz
Qt-b3981fd1f7b82742857c613af6dfbe41b5493577.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: bin/syncqt demos/declarative/snake/content/snake.js demos/declarative/snake/snake.qml doc/src/development/qmake-manual.qdoc src/corelib/plugin/plugin.pri src/gui/kernel/qapplication_win.cpp src/gui/kernel/qdesktopwidget_win.cpp src/gui/painting/qdrawhelper.cpp tests/auto/qdir/tst_qdir.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf
Diffstat (limited to 'doc/src/getting-started')
-rw-r--r--doc/src/getting-started/gettingstartedqml.qdoc50
-rw-r--r--doc/src/getting-started/known-issues.qdoc4
2 files changed, 21 insertions, 33 deletions
diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc
index a19d281..6cef316 100644
--- a/doc/src/getting-started/gettingstartedqml.qdoc
+++ b/doc/src/getting-started/gettingstartedqml.qdoc
@@ -296,8 +296,8 @@
\section2 Using Data Models and Views
- QML has different \l {Data Models}{data views} that display
- \l {Data Models}{data models}. Our menu bar will display the menus in a list,
+ QML has different \l{QML Data Models}{data views} that display
+ \l{QML Data Models}{data models}. Our menu bar will display the menus in a list,
with a header that displays a row of menu names. The list of menus are declared
inside a \c VisualItemModel. The \l{VisualItemModel}{\c VisualItemModel}
element contains items that already have views such as \c Rectangle elements
@@ -404,13 +404,9 @@
\image qml-texteditor2_menubar.png
- */
+ \section1 Building a Text Editor
- /*!
- \page qml-textEditor3.html
- \title Building a Text Editor
-
- \section1 Declaring a TextArea
+ \section2 Declaring a TextArea
Our text editor is not a text editor if it didn't contain an editable text area.
QML's \l {TextEdit}{TextEdit} element allows the declaration of a multi-line
@@ -451,7 +447,7 @@
}
\endcode
- \section1 Combining Components for the Text Editor
+ \section2 Combining Components for the Text Editor
We are now ready to create the layout of our text editor using QML. The text
editor has two components, the menu bar we created and the text area. QML allows
@@ -494,12 +490,8 @@
\image qml-texteditor3_texteditor.png
- */
-
- /*!
- \page qml-textEditor4
- \title Decorating the Text Editor
- \section1 Implementing a Drawer Interface
+ \section1 Decorating the Text Editor
+ \section2 Implementing a Drawer Interface
Our text editor looks simple and we need to decorate it. Using QML, we can declare
transitions and animate our text editor. Our menu bar is occupying one-third of the
@@ -652,7 +644,7 @@
The first color starts at \c 0.0 and the last color is at \c 1.0.
- \section2 Where to Go from Here
+ \section3 Where to Go from Here
We are finished building the user interface of a very simple text editor.
Going forward, the user interface is complete, and we can implement the
@@ -661,7 +653,7 @@
\image qml-texteditor4_texteditor.png
- \section1 Extending QML using Qt C++
+ \section2 Extending QML using Qt C++
Now that we have our text editor layout, we may now implement the text editor
functionalities in C++. Using QML with C++ enables us to create our application
@@ -672,7 +664,7 @@
we shall implement the load and save functions in C++ and export it as a plugin.
This way, we only need to load the QML file directly instead of running an executable.
- \section2 Exposing C++ Classes to QML
+ \section3 Exposing C++ Classes to QML
We will be implementing file loading and saving using Qt and C++. C++ classes
and functions can be used in QML by registering them. The class also needs to be
@@ -687,7 +679,7 @@
\o A \c qmldir file telling the qmlviewer tool where to find the plugin
\endlist
- \section2 Building a Qt Plugin
+ \section3 Building a Qt Plugin
To build a plugin, we need to set the following in a Qt project file. First,
the necessary sources, headers, and Qt modules need to be added into our
@@ -721,7 +713,7 @@
parent's \c plugins directory.
- \section2 Registering a Class into QML
+ \section3 Registering a Class into QML
\code
In dialogPlugin.h:
@@ -771,7 +763,7 @@
file to generate the necessary meta-object code.
- \section2 Creating QML Properties in a C++ class
+ \section3 Creating QML Properties in a C++ class
We can create QML elements and properties using C++ and
\l {The Meta-Object System}{Qt's Meta-Object System}. We can implement
@@ -820,11 +812,11 @@
The \c files list property is a list of all the filtered files in a directory.
The \c Directory class is implemented to filter out invalid text files; only
- files with a \c .txt extension are valid. Further, \l {QLists}{QLists} can be
- used in QML files by declaring them as a \c QDeclarativeListProperty in C++.
- The templated object needs to inherit from a \l {QObject}{QObject}, therefore,
- the \c File class must also inherit from \c QObject. In the \c Directory class,
- the list of \c File objects is stored in a \c QList called \c m_fileList.
+ files with a \c .txt extension are valid. Further, \l{QList}s can be
+ used in QML files by declaring them as a QDeclarativeListProperty in C++.
+ The templated object needs to inherit from a QObject, therefore,
+ the \c File class must also inherit from QObject. In the \c Directory class,
+ the list of \c File objects is stored in a QList called \c m_fileList.
\code
class File : public QObject{
@@ -925,7 +917,7 @@
\c make to build and transfer the plugin to the \c plugins directory.
- \section2 Importing a Plugin in QML
+ \section3 Importing a Plugin in QML
The qmlviewer tool imports files that are in the same directory as the
application. We can also create a \c qmldir file containing the locations of
@@ -948,7 +940,7 @@
\c TARGET field in the project file. The compiled plugin is in the \c plugins directory.
- \section2 Integrating a File Dialog into the File Menu
+ \section3 Integrating a File Dialog into the File Menu
Our \c FileMenu needs to display the \c FileDialog element, containing a list of
the text files in a directory thus allowing the user to select the file by
@@ -1038,7 +1030,7 @@
\image qml-texteditor5_filemenu.png
- \section1 Text Editor Completion
+ \section2 Text Editor Completion
\image qml-texteditor5_newfile.png
diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc
index 0fa23f6..0c2d8d8 100644
--- a/doc/src/getting-started/known-issues.qdoc
+++ b/doc/src/getting-started/known-issues.qdoc
@@ -63,10 +63,6 @@
\list
- \o Performing a new install of the Qt 4.6 beta on Snow Leopard
- triggers a bug in the installer that causes the install to fail.
- Updating an existing Qt installation works fine.
-
\o There are two workarounds, either disable spotlight for the target
drive during the install, or do a custom install where you deselect
documentation and examples. Run the installer again as a full