summaryrefslogtreecommitdiffstats
path: root/doc/src/getting-started
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/getting-started')
-rw-r--r--doc/src/getting-started/demos.qdoc10
-rw-r--r--doc/src/getting-started/examples.qdoc19
-rw-r--r--doc/src/getting-started/gettingstarted.qdoc10
-rw-r--r--doc/src/getting-started/gettingstartedqml.qdoc98
-rw-r--r--doc/src/getting-started/gettingstartedqt.qdoc10
-rw-r--r--doc/src/getting-started/how-to-learn-qt.qdoc10
-rw-r--r--doc/src/getting-started/installation.qdoc26
-rw-r--r--doc/src/getting-started/known-issues.qdoc10
-rw-r--r--doc/src/getting-started/tutorials.qdoc10
9 files changed, 108 insertions, 95 deletions
diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc
index f52fc92d9c..2fe39a2df1 100644
--- a/doc/src/getting-started/demos.qdoc
+++ b/doc/src/getting-started/demos.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/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 596cc01605..a145e24100 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.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
@@ -32,11 +32,11 @@
Qt includes a set of examples that cover nearly every aspect of Qt
development. They aren't meant to be impressive when you run them,
but in each case the source code has been carefully written to
- illustrate one or more best Qt programming practices.
+ illustrate one or more best Qt programming practices.
You can run the examples from the \l{Examples and Demos Launcher}
application (except see \l{QML Examples and Demos} {QML Examples}
- for special instructions for running thos examples).
+ for special instructions for running those examples).
The examples are listed below by functional area. Each example
listed in a particular functional area is meant to illustrate how
@@ -766,6 +766,9 @@
\row \o \l{webkit/googlechat}{Google Chat}
\o A real-world example that shows how an existing Web-based service can be accessed
using QtWebKit.
+ \row \o \l{webkit/imageanalyzer}{Image Analyzer}\raisedaster
+ \o A \l{The QtWebKit Bridge}{QtWebKit bridge} application which contains a
+ web interface and client-side processing.
\row \o \l{webkit/previewer}{Previewer}\raisedaster
\o Shows how to make a simple Web page previewer by using Qt's text input widgets
together with a QWebView widget.
@@ -778,7 +781,7 @@
*/
/*!
- \page examples-helpsystem.html
+ \page examples-helpsystem.html
\ingroup all-examples
\title Help System Examples
\brief Adding interactive help to your Qt application.
diff --git a/doc/src/getting-started/gettingstarted.qdoc b/doc/src/getting-started/gettingstarted.qdoc
index e58305a23f..162dba1df5 100644
--- a/doc/src/getting-started/gettingstarted.qdoc
+++ b/doc/src/getting-started/gettingstarted.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/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc
index a6159c3728..065628a701 100644
--- a/doc/src/getting-started/gettingstartedqml.qdoc
+++ b/doc/src/getting-started/gettingstartedqml.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
@@ -35,6 +35,16 @@
After reading this guide, you should be ready to develop your own applications
using QML and Qt C++.
+ \section1 Installation
+
+ First, we would need to install the latest version of Qt that includes \l{Qt
+ Quick}, which is Qt 4.7. The \l{Installation} {installation} guide contains
+ installation instructions and requirements for different platforms.
+
+ Qt Quick includes a declarative language called
+ \l{Introduction to the QML language}{QML}, the \l{QtDeclarative Module}, and
+ \l{QML Viewer}.
+
\section1 QML to Build User Interfaces
The application we are building is a simple text editor that will load, save,
@@ -68,10 +78,10 @@
We start our text editor by building a button. Functionally, a button has a mouse
sensitive area and a label. Buttons perform actions when a user presses the button.
- In QML, the basic visual item is the \l {Rectangle}{Rectangle} element. The
- \c Rectangle element has properties to control the element's appearance and location.
+ In QML, the basic visual item is the \l {Rectangle}{Rectangle} element. The
+ \c Rectangle element has properties to control the element's appearance and location.
- \snippet examples/tutorials/gettingStarted/gsQml/part0/Button.qml document
+ \snippet examples/tutorials/gettingStarted/gsQml/core/Button.qml document
First, the \c { import QtQuick 1.0 } allows the qmlviewer tool to import the QML elements
we will later use. This line must exist for every QML file. Notice that the version
@@ -88,7 +98,7 @@
\c text property. The label is contained within the Rectangle and in order to center
it in the middle, we assign the \c anchors of the Text element to its parent, which
is called \c simplebutton. Anchors may bind to other items' anchors, allowing layout
- assignments simpler.
+ assignments simpler.
We shall save this code as \c SimpleButton.qml. Running qmlviewer with the file as the
argument will display the grey rectangle with a text label.
@@ -104,7 +114,7 @@
id:simplebutton
...
- MouseArea{
+ MouseArea{
id: buttonMouseArea
anchors.fill: parent //anchor all sides of the mouse area to the rectangle's anchors
@@ -126,7 +136,7 @@
whenever the acceptable mouse button is clicked, the left click being the default. We
can bind actions to the onClicked handler. In our example, \c console.log() outputs text
whenever the mouse area is clicked. The function \c console.log() is a useful tool for
- debugging purposes and for outputting text.
+ debugging purposes and for outputting text.
The code in \c SimpleButton.qml is sufficient to display a button on the screen and
output text whenever it is clicked with a mouse.
@@ -136,7 +146,7 @@
id:Button
...
- property color buttonColor: "lightblue"
+ property color buttonColor: "lightblue"
property color onHoverColor: "gold"
property color borderColor: "white"
@@ -145,8 +155,8 @@
console.log(buttonLabel.text + " clicked" )
}
- MouseArea{
- onClicked: buttonClick()
+ MouseArea{
+ onClicked: buttonClick()
hoverEnabled: true
onEntered: parent.border.color = onHoverColor
onExited: parent.border.color = borderColor
@@ -210,12 +220,12 @@
\code
import QtQuick 1.0 \\import the main Qt QML module
- import "folderName" \\import the contents of the folder
+ import "folderName" \\import the contents of the folder
import "script.js" as Script \\import a Javascript file and name it as Script
\endcode
The syntax shown above shows how to use the \c import keyword. This is required to
- use JavaScript files, or QML files that are not within the same directory. Since
+ use JavaScript files, or QML files that are not within the same directory. Since
\c Button.qml is in the same directory as \c FileMenu.qml, we do not need to import
the \c Button.qml file to use it. We can directly create a \c Button element by declaring
\c Button{}, similar to a \c Rectangle{} declaration.
@@ -242,7 +252,7 @@
label: "Exit"
buttonColor: "darkgrey"
- onButtonClick: Qt.quit()
+ onButtonClick: Qt.quit()
}
}
\endcode
@@ -266,7 +276,7 @@
The declaration of the edit menu is very similar at this stage. The menu has
buttons that have the labels: \c Copy, \c Paste, and \c {Select All}.
- \image qml-texteditor1_editmenu.png
+ \image qml-texteditor1_editmenu.png
Armed with our knowledge of importing and customizing previously made
components, we may now combine these menu pages to create a menu bar,
@@ -333,7 +343,7 @@
//control the movement of the menu switching
snapMode: ListView.SnapOneItem
orientation: ListView.Horizontal
- boundsBehavior: Flickable.StopAtBounds
+ boundsBehavior: Flickable.StopAtBounds
flickDeceleration: 5000
highlightFollowsCurrentItem: true
highlightMoveDuration:240
@@ -346,7 +356,7 @@
code above sets \c Flickable properties to create the desired flicking movement
to our view. In particular,the property \c highlightMoveDuration changes the
duration of the flick transition. A higher \c highlightMoveDuration value
- results in slower menu switching.
+ results in slower menu switching.
The \c ListView maintains the model items through an \c index and each visual
item in the model is accessible through the \c index, in the order of the
@@ -380,7 +390,7 @@
id: editButton
label: "Edit"
...
- onButtonClick: menuListView.currentIndex = 1
+ onButtonClick: menuListView.currentIndex = 1
}
}
}
@@ -389,7 +399,7 @@
The menu bar we just created can be flicked to access the menus or by clicking
on the menu names at the top. Switching menu screens feel intuitive and responsive.
- \image qml-texteditor2_menubar.png
+ \image qml-texteditor2_menubar.png
\section1 Building a Text Editor
@@ -402,7 +412,7 @@
\code
TextEdit{
- id: textEditor
+ id: textEditor
anchors.fill:parent
width:parent.width; height:parent.height
color:"midnightblue"
@@ -475,14 +485,14 @@
that already have defined behaviors. Using this approach, application layouts
and UI components can be created easily.
- \image qml-texteditor3_texteditor.png
+ \image qml-texteditor3_texteditor.png
\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
- screen and it would be nice to have it only appear when we want it.
+ screen and it would be nice to have it only appear when we want it.
We can add a drawer interface, that will contract or expand the menu bar when clicked.
In our implementation, we have a thin rectangle that responds to mouse clicks. The
@@ -537,7 +547,7 @@
the item's \c transitions property. Our text editor has a state transition whenever
the state changes to either \c DRAWER_OPEN or \c DRAWER_CLOSED. Importantly, the
transition needs a \c from and a \c to state but for our transitions, we can use
- the wild card \c * symbol to denote that the transition applies to all state changes.
+ the wild card \c * symbol to denote that the transition applies to all state changes.
During transitions, we can assign animations to the property changes. Our
\c menuBar switches position from \c {y:0} to \c {y:-partition} and we can animate
@@ -561,7 +571,7 @@
Behavior{
NumberAnimation{property: "rotation";easing.type: Easing.OutExpo }
- }
+ }
\endcode
Going back to our components with knowledge of states and animations, we can improve
@@ -607,9 +617,9 @@
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
application logic using regular Qt and C++. QML works nicely as a prototyping
- tool, separating the application logic away from the UI design.
+ tool, separating the application logic away from the UI design.
- \image qml-texteditor4_texteditor.png
+ \image qml-texteditor4_texteditor.png
\section2 Extending QML using Qt C++
@@ -622,7 +632,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.
- \section3 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
@@ -645,7 +655,7 @@
directory.
\code
- In cppPlugins.pro:
+ In filedialog.pro:
TEMPLATE = lib
CONFIG += qt plugin
@@ -762,7 +772,7 @@
Similarly, we have the other properties declared according to their uses. The
\c filesCount property indicates the number of files in a directory. The filename
property is set to the currently selected file's name and the loaded/saved file
- content is stored in \c fileContent property.
+ content is stored in \c fileContent property.
\code
Q_PROPERTY(QDeclarativeListProperty<File> files READ files CONSTANT )
@@ -811,10 +821,10 @@
Regular C++ functions are also accessible from QML. The file loading and saving
functions are implemented in C++ and declared using the
\l {Q_INVOKABLE}{Q_INVOKABLE} macro. Alternatively, we can declare the functions
- as a \c slot and the functions will be accessible from QML.
+ as a \c slot and the functions will be accessible from QML.
\code
- In Directory.h:
+ In Directory.h:
Q_INVOKABLE void saveFile();
Q_INVOKABLE void loadFile();
@@ -848,9 +858,9 @@
The constructor passes pointers to functions that will append the list, count
the list, retrieve the item using an index, and empty the list. Only the append
function is mandatory. Note that the function pointers must match the definition
- of \l {QDeclarativeListProperty::AppendFunction}{AppendFunction},
- \l {QDeclarativeListProperty::CountFunction}{CountFunction},
- \l {QDeclarativeListProperty::AtFunction}{AtFunction}, or
+ of \l {QDeclarativeListProperty::AppendFunction}{AppendFunction},
+ \l {QDeclarativeListProperty::CountFunction}{CountFunction},
+ \l {QDeclarativeListProperty::AtFunction}{AtFunction}, or
\l {QDeclarativeListProperty::ClearFunction}{ClearFunction}.
\code
@@ -871,7 +881,7 @@
text files is in the application directory, get the file's name and content as a
string, and be notified whenever there are changes in the directory contents.
- To build the plugin, run \c qmake on the \c cppPlugins.pro project file, then run
+ To build the plugin, run \c qmake on the \c filedialog.pro project file, then run
\c make to build and transfer the plugin to the \c plugins directory.
@@ -883,7 +893,7 @@
plugins and other resources.
\code
- In qmldir:
+ In qmldir:
Button ./Button.qml
FileDialog ./FileDialog.qml
@@ -895,7 +905,7 @@
\endcode
The plugin we just created is called \c FileDialog, as indicated by the
- \c TARGET field in the project file. The compiled plugin is in the \c plugins directory.
+ \c TARGET field in the project file. The compiled plugin is in the \c plugins directory.
\section3 Integrating a File Dialog into the File Menu
@@ -910,7 +920,7 @@
\c FileDialog element that the directory refreshed its contents. This notification
is performed in the signal handler, \c onDirectoryChanged.
- \code
+ \code
In FileMenu.qml:
Directory{
@@ -922,7 +932,7 @@
Keeping with the simplicity of our application, the file dialog will always be
visible and will not display invalid text files, which do not have a \c .txt
- extension to their filenames.
+ extension to their filenames.
\code
In FileDialog.qml:
@@ -981,10 +991,10 @@
will transfer the text from the \c TextEdit onto the directory's \c fileContent
property, then copy its file name from the editable text input. Finally, the button
calls the \c saveFile() function, saving the file. The \c loadButton has a similar
- execution. Also, the \c New action will empty the contents of the \c TextEdit.
+ execution. Also, the \c New action will empty the contents of the \c TextEdit.
Further, the \c EditMenu buttons are connected to the \c TextEdit functions to copy,
- paste, and select all the text in the text editor.
+ paste, and select all the text in the text editor.
\image qml-texteditor5_filemenu.png
diff --git a/doc/src/getting-started/gettingstartedqt.qdoc b/doc/src/getting-started/gettingstartedqt.qdoc
index 25d0ccd22f..945d7c33cb 100644
--- a/doc/src/getting-started/gettingstartedqt.qdoc
+++ b/doc/src/getting-started/gettingstartedqt.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/getting-started/how-to-learn-qt.qdoc b/doc/src/getting-started/how-to-learn-qt.qdoc
index 8ca1735468..e9f462ce93 100644
--- a/doc/src/getting-started/how-to-learn-qt.qdoc
+++ b/doc/src/getting-started/how-to-learn-qt.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/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index bc0128cc09..c6e79d96c7 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.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
@@ -392,10 +392,10 @@ must be run as root.
*/
/*! \page install-wince.html
-\title Installing Qt on Windows CE
+\title Installing Qt for Windows CE
\ingroup installation
\ingroup qtce
-\brief How to install Qt on Windows CE.
+\brief How to install Qt for Windows CE.
\previouspage Installation
\tableofcontents
@@ -492,9 +492,9 @@ in the \l{Qt for Windows CE Requirements} document.
*/
/*! \page install-Symbian-installer.html
-\title Installing Qt on the Symbian platform from a Binary Package
+\title Installing Qt for the Symbian platform from a Binary Package
\ingroup qtsymbian
-\brief How to install Qt on the Symbian platform from a binary package.
+\brief How to install Qt for the Symbian platform from a binary package.
\previouspage Installation
\tableofcontents
@@ -551,10 +551,10 @@ Symbian platform,
*/
/*! \page install-Symbian.html
-\title Installing Qt on the Symbian platform
+\title Installing Qt for the Symbian platform
\ingroup installation
\ingroup qtsymbian
-\brief How to install Qt on the Symbian platform.
+\brief How to install Qt for the Symbian platform.
\previouspage Installation
\tableofcontents
@@ -685,10 +685,10 @@ Binary Package} document.
*/
/*! \page install-Symbian-linux.html
-\title Installing Qt on the Symbian platform using Linux (experimental)
+\title Installing Qt for the Symbian platform using Linux (experimental)
\ingroup installation
\ingroup qtsymbian
-\brief How to install Qt on the Symbian platform using Linux.
+\brief How to install Qt for the Symbian platform using Linux.
\previouspage Installation
\tableofcontents
diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc
index 942c41d5d4..d0044f3cce 100644
--- a/doc/src/getting-started/known-issues.qdoc
+++ b/doc/src/getting-started/known-issues.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/getting-started/tutorials.qdoc b/doc/src/getting-started/tutorials.qdoc
index 46a58084f4..2c5ebaf605 100644
--- a/doc/src/getting-started/tutorials.qdoc
+++ b/doc/src/getting-started/tutorials.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