diff options
Diffstat (limited to 'doc')
158 files changed, 395 insertions, 240 deletions
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc index 4c97e1a..2ca9418 100644 --- a/doc/src/declarative/advtutorial.qdoc +++ b/doc/src/declarative/advtutorial.qdoc @@ -423,7 +423,7 @@ Here is the \c saveHighScore() function in \c samegame.js: First we call \c sendHighScore() (explained in the section below) if it is possible to send the high scores to an online database. -Then, we use the \l{Offline Storage API} to maintain a persistant SQL database unique to this application. We create an offline storage database for the high scores using \c openDatabase() and prepare the data and SQL query that we want to use to save it. The offline storage API uses SQL queries for data manipulation and retrival, and in the \c db.transaction() call we use three SQL queries to initialize the database (if necessary), and then add to and retrieve high scores. To use the returned data, we turn it into a string with one line per row returned, and show a dialog containing that string. +Then, we use the \l{Offline Storage API} to maintain a persistent SQL database unique to this application. We create an offline storage database for the high scores using \c openDatabase() and prepare the data and SQL query that we want to use to save it. The offline storage API uses SQL queries for data manipulation and retrieval, and in the \c db.transaction() call we use three SQL queries to initialize the database (if necessary), and then add to and retrieve high scores. To use the returned data, we turn it into a string with one line per row returned, and show a dialog containing that string. This is one way of storing and displaying high scores locally, but certainly not the only way. A more complex alternative would be to create a high score dialog component, and pass it the results for processing and display (instead of reusing the \c Dialog). This would allow a more themeable dialog that could better present the high scores. If your QML is the UI for a C++ application, you could also have passed the score to a C++ function to store it locally in a variety of ways, including a simple format without SQL or in another SQL database. diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index cb326a3..a8df4b1 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -73,6 +73,7 @@ Module. \section1 Getting Started \list +\o \l{What's new in Qt Quick} \o \l{Introduction to the QML language} \o \l{QML for Qt Programmers} \o \l{Getting Started Programming with QML} diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index 9929cfe..3f075bb 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -28,7 +28,7 @@ /*! \page qdeclarativeexamples.html \title QML Examples and Demos - \brief Building UI's with QML + \brief Building UIs with QML \ingroup all-examples diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index a1ffde0..df8a1e7 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -719,7 +719,7 @@ it in two steps, like this: \endcode If a default value is not supplied or set later in the file, each type has a -default value for when none is explictly set. Below are the default values +default value for when none is explicitly set. Below are the default values of some of the types. For the remaining types the default values are undefined. \table @@ -823,7 +823,7 @@ A property alias declaration looks a lot like a property definition: As the aliasing property has the same type as the aliased property, an explicit type is omitted, and the special "alias" keyword is used. Instead of a default -value, a property alias includes a compulsary alias reference. The alias +value, a property alias includes a compulsory alias reference. The alias reference is used to locate the aliased property. While similar to a property binding, the alias reference syntax is highly restricted. @@ -993,7 +993,7 @@ Return values of type QVariant are also supported via Q_RETURN_ARG. \target components A component is a reusable type with a well-defined interface built entirely in -QML. Components appear as regular QML elements, and can be used interchangably +QML. Components appear as regular QML elements, and can be used interchangeably with core types. Components allow developers to create new types to be reused in other projects without the use of C++. Components can also help to reduce duplication inside one project by limiting the need for large numbers of @@ -1086,7 +1086,7 @@ Methods and signals may be added in the same way. As all external methods, signals and properties are accessible to external users, developers should ensure that setting these properties does not have -any undesirable side-effects. For most resiliance, root level properties should +any undesirable side-effects. For most resilience, root level properties should only be used for literal default values. When a root level property must be used inside the component - such as the children property - property aliases can be used to redirect this property to a "safe" location for external users. diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc index 56ea165..c3c94c5 100644 --- a/doc/src/declarative/focus.qdoc +++ b/doc/src/declarative/focus.qdoc @@ -120,7 +120,7 @@ hand side of the following table shows what we would like to be able to write. Here we create two instances of our previously defined component, and set the second one to have focus. The intention is that when the \e A, \e B, or \e C keys are pressed, the second of the two components receives the event and -reponds accordingly. +responds accordingly. \table \row @@ -276,7 +276,7 @@ Focus scopes allow focus to allocation to be easily partitioned. Several QML items use it to this effect. \l ListView, for example, is itself a focus scope. Generally this isn't -noticable as \l ListView doesn't usually have manually added visual children. +noticeable as \l ListView doesn't usually have manually added visual children. By being a focus scope, \l ListView can focus the current list item without worrying about how that will effect the rest of the application. This allows the current item delegate to react to key presses. @@ -301,14 +301,4 @@ actually performs the work of handling the \e {Return} key. All of the QML view classes, such as \l PathView and \l GridView, behave in a similar manner to allow key handling in their respective delegates. - -\section1 Focus Panels - -Traditional UIs are composed of many top-level windows. Windows actually -perform two tasks - they act as the visual bounds for a widget, and they segment -focus. Each window has a separate focused widget, that becomes (to mix -terminologies) the \e {active focus} widget when the window is the active -window. - -### Focus panels do basically the same thing. */ diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc index 467b7d0..25a61c9 100644 --- a/doc/src/declarative/modules.qdoc +++ b/doc/src/declarative/modules.qdoc @@ -52,7 +52,7 @@ An \c import statement includes the module name, and possibly a version number. This can be seen in the snippet commonly found at the top of QML files: \qml - import Qt 4.7 + import QtQuick 1.0 \endqml This imports version 4.7 of the "Qt" module into the global namespace. (The QML @@ -126,7 +126,7 @@ application code. When importing an installed module, an un-quoted URI is used, with a mandatory version number: \code - import Qt 4.7 + import QtQuick 1.0 import com.nokia.qml.mymodule 1.0 \endcode @@ -181,7 +181,7 @@ By default, when a module is imported, its contents are imported into the global To import a module into a specific namespace, use the \e as keyword: \qml - import Qt 4.7 as QtLibrary + import QtQuick 1.0 as QtLibrary import "../MyComponents" as MyComponents import com.nokia.qml.mymodule 1.0 as MyModule \endqml @@ -199,7 +199,7 @@ Types from these modules can then only be used when qualified by the namespace: Multiple modules can be imported into the same namespace in the same way that multiple modules can be imported into the global namespace: \qml - import Qt 4.7 as Nokia + import QtQuick 1.0 as Nokia import Ovi 1.0 as Nokia \endqml @@ -233,7 +233,7 @@ internal <TypeName> <File> plugin <Name> [<Path>] \endcode -\bold {# <Commment>} lines are used for comments. They are ignored by the QML engine. +\bold {# <Comment>} lines are used for comments. They are ignored by the QML engine. \bold {<TypeName> [<InitialVersion>] <File>} lines are used to add QML files as types. <TypeName> is the type being made available, the optional <InitialVersion> is a version @@ -246,7 +246,7 @@ the \c qmldir file. Types which you do not wish to export to users of your modul may be marked with the \c internal keyword: \bold {internal <TypeName> <File>}. The same type can be provided by different files in different versions, in which -case later versions (eg. 1.2) must precede earlier versions (eg. 1.0), +case later versions (e.g. 1.2) must precede earlier versions (e.g. 1.0), since the \e first name-version match is used and a request for a version of a type can be fulfilled by one defined in an earlier version of the module. If a user attempts to import a version earlier than the earliest provided or later than the latest provided, diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc index 314bf67..f58d8fe 100644 --- a/doc/src/declarative/propertybinding.qdoc +++ b/doc/src/declarative/propertybinding.qdoc @@ -48,7 +48,7 @@ Rectangle { QML extends a standards compliant JavaScript engine, so any valid JavaScript expression can be used as a property binding. Bindings can access object properties, make function calls and even use builtin JavaScript objects like \e {Date} and \e {Math}. Assigning a constant value to a -property can even be thought of as a binding - afterall, a constant is a valid JavaScript +property can even be thought of as a binding - after all, a constant is a valid JavaScript expression! Here are some examples of more complex bindings: \code diff --git a/doc/src/declarative/qdeclarativedebugging.qdoc b/doc/src/declarative/qdeclarativedebugging.qdoc index ea21852..26d3b38 100644 --- a/doc/src/declarative/qdeclarativedebugging.qdoc +++ b/doc/src/declarative/qdeclarativedebugging.qdoc @@ -59,7 +59,7 @@ from QML's import loading mechanisms. For example, for a simple QML file like this: \qml -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 } \endqml @@ -79,20 +79,8 @@ QDeclarativeImportDatabase::resolveType "Rectangle" = "QDeclarativeRectangle" \section1 Debugging with Qt Creator \l{http://qt.nokia.com/products/developer-tools}{Qt Creator} provides built-in -support for QML debugging. Open a QML project in Creator and enter Debug mode, -or click the "Start Debugging" option from the menu, and Creator will -show QML debugging information and options for your application, including -object inspection, property monitoring and application frame-rate analysis. - -Creator can be used to debug both local and remote QML applications. To -enable remote debugging, start the \l {QML Viewer} -on the remote device with a debugging port defined, like this: - -\code - QML_DEBUG_SERVER_PORT=3768 qmlviewer myqmlfile.qml -\endcode - -In Creator, open the project settings pane and set the server and port -details for the remote device, then start debugging. +support for QML debugging. QML projects and standalone C++ applications that +utilize QML can be debugged on desktops as well as on remote devices. +For more information, see the Qt Creator Manual. */ diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc index 8ca6c11..b6af90b 100644 --- a/doc/src/declarative/qdeclarativedocument.qdoc +++ b/doc/src/declarative/qdeclarativedocument.qdoc @@ -82,7 +82,7 @@ Each instance is created with a different value for its \c text property: \o \snippet doc/src/snippets/declarative/qml-documents/qmldocuments.qml document \o \qml -import Qt 4.7 +import QtQuick 1.0 Column { spacing: 10 diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc index 70a3587..620b902 100644 --- a/doc/src/declarative/qdeclarativei18n.qdoc +++ b/doc/src/declarative/qdeclarativei18n.qdoc @@ -58,7 +58,7 @@ that needs to be translated is enclosed in a call to \c qsTr(). hello.qml: \qml -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc index fa42f59..c97240c 100644 --- a/doc/src/declarative/qdeclarativeintro.qdoc +++ b/doc/src/declarative/qdeclarativeintro.qdoc @@ -46,7 +46,7 @@ technologies like HTML and CSS, but it's not required. QML looks like this: \code -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200 @@ -173,7 +173,7 @@ Item { } \endcode -QML properties are what is known as \e typesafe. That is, they only allow you to assign a value that +QML properties are what is known as \e type-safe. That is, they only allow you to assign a value that matches the property type. For example, the \c x property of item is a real, and if you try to assign a string to it you will get an error. @@ -189,7 +189,7 @@ Each object can be given a special unique property called an \e id. No other obj same \l{QML Documents}{QML document} can have the same \c id value. Assigning an id enables the object to be referred to by other objects and scripts. -The first Rectangle element below has an \e id, "myRect". The second Rectange element defines its +The first Rectangle element below has an \e id, "myRect". The second Rectangle element defines its own width by referring to \tt myRect.width, which means it will have the same \tt width value as the first Rectangle element. diff --git a/doc/src/declarative/qdeclarativeperformance.qdoc b/doc/src/declarative/qdeclarativeperformance.qdoc index be8c029..061a71c 100644 --- a/doc/src/declarative/qdeclarativeperformance.qdoc +++ b/doc/src/declarative/qdeclarativeperformance.qdoc @@ -51,7 +51,7 @@ Rectangle { x: 20 width: 200; height: 200 } -Rectange { +Rectangle { id: rect2 x: rect1.x y: rect1.y + rect1.height @@ -68,7 +68,7 @@ Rectangle { x: 20 width: 200; height: 200 } -Rectange { +Rectangle { id: rect2 height: 200 anchors.left: rect1.left diff --git a/doc/src/declarative/qdeclarativesecurity.qdoc b/doc/src/declarative/qdeclarativesecurity.qdoc index 199e2da..7395af3 100644 --- a/doc/src/declarative/qdeclarativesecurity.qdoc +++ b/doc/src/declarative/qdeclarativesecurity.qdoc @@ -48,7 +48,7 @@ import "http://evil.com/evil.js" as Evil is equivalent to downloading "http://evil.com/evil.exe" and running it. The JavaScript execution environment of QML does not try to stop any particular accesses, including local file system access, just as for any native Qt application, so the "doEvil" function could do the same things -as a native Qt application, a Python application, a Perl script, ec. +as a native Qt application, a Python application, a Perl script, etc. As with any application accessing other content beyond it's control, a QML application should perform appropriate checks on untrusted data it loads. diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc index 274040a..148726f 100644 --- a/doc/src/declarative/qdeclarativestates.qdoc +++ b/doc/src/declarative/qdeclarativestates.qdoc @@ -221,7 +221,7 @@ Rectangle { This \l Transition defines that if any \c x or \c y properties have changed during a state change within this item, their values should be animated over 500 -millliseconds. +milliseconds. See the \l Transitions documentation for more information. diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc index b77611c..18fa439 100644 --- a/doc/src/declarative/qml-intro.qdoc +++ b/doc/src/declarative/qml-intro.qdoc @@ -262,7 +262,7 @@ myRectangle.top // Correct We can transform a graphical object to get additional effects. Rotate a piece of text by 180 degrees to display upside-down text. Rotate an image by 90 degrees to lay it on its side. These transformations require -additonal information. +additional information. For rotation, the additional information includes: the origin relative to the object being rotated, the axis of rotation, and the angle in degrees to diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc index 9a84237..51f9e4d 100644 --- a/doc/src/declarative/qmlruntime.qdoc +++ b/doc/src/declarative/qmlruntime.qdoc @@ -60,7 +60,7 @@ QDeclarativeView is a QWidget-based class that is able to load QML files. For example, if there is a QML file, \c application.qml, like this: \qml - import Qt 4.7 + import QtQuick 1.0 Rectangle { width: 100; height: 100; color: "red" } \endqml diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc index 41c4c80..81ad218 100644 --- a/doc/src/declarative/qmlviewer.qdoc +++ b/doc/src/declarative/qmlviewer.qdoc @@ -118,7 +118,7 @@ For example, this QML document refers to a \c lottoNumbers property which does not actually exist within the document: \qml -import Qt 4.7 +import QtQuick 1.0 ListView { width: 200; height: 300 @@ -131,7 +131,7 @@ If within the document's directory, there is a "dummydata" directory which contains a \c lottoNumbers.qml file like this: \qml -import Qt 4.7 +import QtQuick 1.0 ListModel { ListElement { number: 23 } @@ -146,7 +146,7 @@ Child properties are included when loaded from dummy data. The following documen refers to a \c clock.time property: \qml -import Qt 4.7 +import QtQuick 1.0 Text { text: clock.time } \endqml @@ -154,7 +154,7 @@ The text value could be filled by a \c dummydata/clock.qml file with a \c time property in the root context: \qml -import Qt 4.7 +import QtQuick 1.0 QtObject { property int time: 54321 } \endqml diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc index 6eade18..53db5c7 100644 --- a/doc/src/declarative/qtbinding.qdoc +++ b/doc/src/declarative/qtbinding.qdoc @@ -134,7 +134,7 @@ the window text will update accordingly. To detect when a C++ property value - in this case the \c CustomPalette's \c text property - changes, the property must have a corresponding NOTIFY signal. The NOTIFY signal specifies a signal that is emitted whenever the property changes value. Implementers should take care to only emit the -signal if the value \e changes to prevent loops from occuring. Accessing a property from a +signal if the value \e changes to prevent loops from occurring. Accessing a property from a binding that does not have a NOTIFY signal will cause QML to issue a warning at runtime. \section2 Dynamic Structured Data @@ -188,7 +188,7 @@ is to have a "running" property in \c main.qml. This leads to much nicer QML co \o \code // main.qml -import Qt 4.7 +import QtQuick 1.0 Rectangle { MouseArea { @@ -256,7 +256,7 @@ For example: \snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0 Note that the resource system cannot be accessed from QML directly. If the main QML file is -loaded as a resource, all files specifed as relative paths in QML will also be loaded from +loaded as a resource, all files specified as relative paths in QML will also be loaded from the resource system. Using the resource system is completely transparent to the QML layer. This also means that if the main QML file is not loaded as a resource then files in the resource system cannot be accessed from QML. diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc index c0639db..69e6358 100644 --- a/doc/src/declarative/qtprogrammers.qdoc +++ b/doc/src/declarative/qtprogrammers.qdoc @@ -32,7 +32,7 @@ \section1 Overview -While QML does not require Qt knowledge to use, if you \e are already familar with Qt, +While QML does not require Qt knowledge to use, if you \e are already familiar with Qt, much of your knowledge is directly relevant to learning and using QML. Of course, an application with a UI defined in QML also uses Qt for all the non-UI logic. @@ -103,7 +103,7 @@ So, to implement your reusable button, you would simply build a QML component. Parent widgets each provide a generic way to interface to one or more arbitrary other widgets. A QTabWidget provides an interface to multiple "pages", one of which is visible at any time, -and a mechnism for selecting among them (the QTabBar). A QScollArea provides scrollbars around +and a mechanism for selecting among them (the QTabBar). A QScollArea provides scrollbars around a widget that is otherwise too large to fit in available space. Nearly all such components can be created directly in QML. Only a few cases @@ -115,7 +115,7 @@ needs to be divided up into pages. A significant difference in the parenting concept with QML compare to QWidgets is that while child items are positioned relative to their parents, -there is no requirement that they be wholy contained ("clipped") to +there is no requirement that they be wholly contained ("clipped") to the parent (although the clipped property of the child Item does allow this where it is needed). This difference has rather far-reaching consequences, for example: diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc index 363ba8d..17f8632 100644 --- a/doc/src/declarative/scope.qdoc +++ b/doc/src/declarative/scope.qdoc @@ -112,7 +112,7 @@ following example shows a simple QML file that accesses some enumeration values and calls an imported JavaScript function. \code -import Qt 4.7 +import QtQuick 1.0 import "code.js" as Code ListView { @@ -174,7 +174,7 @@ PathView { } \endcode -If the \l Image element omitted the \c root prefix, it would inadvertantly access +If the \l Image element omitted the \c root prefix, it would inadvertently access the unset \c {PathView.scale} attached property on itself. \section1 Component Scope @@ -253,7 +253,7 @@ is used, the \c title property may resolve differently. \code // TitlePage.qml -import Qt 4.7 +import QtQuick 1.0 Item { property string title @@ -269,7 +269,7 @@ Item { } // TitleText.qml -import Qt 4.7 +import QtQuick 1.0 Text { property int size text: "<b>" + title + "</b>" @@ -285,7 +285,7 @@ to use property interfaces, like this: \code // TitlePage.qml -import Qt 4.7 +import QtQuick 1.0 Item { id: root property string title @@ -304,7 +304,7 @@ Item { } // TitleText.qml -import Qt 4.7 +import QtQuick 1.0 Text { property string title property int size diff --git a/doc/src/declarative/whatsnew.qdoc b/doc/src/declarative/whatsnew.qdoc new file mode 100644 index 0000000..f8d1d0e --- /dev/null +++ b/doc/src/declarative/whatsnew.qdoc @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** 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: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. +** +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of this +** file. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! +\title What's new in Qt Quick +\page qtquick-whatsnew.html + +\section1 4.7.1 + +\section2 QtQuick namespace + +In prior Qt releases, all the Qt Quick elements were available in the \e Qt namespace. +Starting with Qt 4.7.1, the elements are also available in the \e QtQuick namespace, +which improves naming consistency, and allows the development of Qt Quick to occur at +a faster rate than Qt's usual minor release schedule. + +The change for developers is very simple - where you previously wrote \e {import Qt 4.7}, +just replace it with \e {import QtQuick 1.0}, like this: + +\code +import QtQuick 1.0 + +Text { + text: "Welcome to QtQuick 1.0!" +} +\endcode + +\e {import Qt 4.7} continues to work so existing applications wont break even if they +aren't updated, but it is recommended that all import statements be modified to the new +form. +*/ diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index d6dc7d6..bc0df04 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -1088,7 +1088,7 @@ For example: - \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 146 + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 152 This will add the specified statements to the \c prj_exports section of the generated \c bld.inf file. @@ -1430,7 +1430,7 @@ targeted to only one of above files by appending listed rules suffix to the variable name: - \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 152 + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 153 On the Symbian platform, the \c default_deployment item specifies default platform and package dependencies. Those dependencies can be @@ -1621,6 +1621,9 @@ \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 36 + Note that \c qmake will skip files that are executable. If you need to install + executable files, you can unset the files' executable flags. + \target LEXIMPLS \section1 LEXIMPLS diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index f849bf0..596cc01 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -273,7 +273,7 @@ \page examples-painting.html \ingroup all-examples \title Painting Examples - \brief How to use the Qt painting system + \brief How to use the Qt painting system. \image painting-examples.png @@ -303,7 +303,7 @@ \page examples-richtext.html \ingroup all-examples \title Rich Text Examples - \brief Using the document-oriented rich text engine + \brief Using the document-oriented rich text engine. \image richtext-examples.png @@ -324,7 +324,7 @@ \page examples-desktop.html \ingroup all-examples \title Desktop Examples - \brief Integrating your Qt application with your favorite desktop + \brief Integrating your Qt application with your favorite desktop. \image desktop-examples.png @@ -371,7 +371,7 @@ \page examples-threadandconcurrent.html \ingroup all-examples \title Threading and Concurrent Programming Examples - \brief Threading and concurrent programming in Qt + \brief Threading and concurrent programming in Qt. \image thread-examples.png @@ -409,7 +409,7 @@ \page examples.tools.html \ingroup all-examples \title Tools Examples - \brief Using Qt's containers, iterators, and other tool classes + \brief Using Qt's containers, iterators, and other tool classes. \image tool-examples.png @@ -445,7 +445,7 @@ \page examples-network.html \ingroup all-examples \title Network Examples - \brief How to do network programming in Qt + \brief How to do network programming in Qt. \image network-examples.png @@ -484,7 +484,7 @@ \page examples-ipc.html \ingroup all-examples \title IPC Examples - \brief Inter-Process Communication with Qt + \brief Inter-Process Communication with Qt. \image ipc-examples.png @@ -499,7 +499,7 @@ \page examples-opengl.html \ingroup all-examples \title OpenGL Examples - \brief Accessing OpenGL from Qt + \brief Accessing OpenGL from Qt. \image opengl-examples.png @@ -531,7 +531,7 @@ \page examples-openvg.html \ingroup all-examples \title OpenVG Examples - \brief Accessing OpenVG from Qt + \brief Accessing OpenVG from Qt. \image opengl-examples.png @@ -550,7 +550,7 @@ \page examples-multimedia.html \ingroup all-examples \title Multimedia Examples - \brief Audio, video, and Phonon with Qt + \brief Audio, video, and Phonon with Qt. \image phonon-examples.png @@ -597,7 +597,7 @@ \page examples-sql.html \ingroup all-examples \title SQL Examples - \brief Accessing your SQL database from Qt + \brief Accessing your SQL database from Qt. \image sql-examples.png @@ -625,7 +625,7 @@ \page examples-xml.html \ingroup all-examples \title XML Examples - \brief Using XML with Qt + \brief Using XML with Qt. \image xml-examples.png XML @@ -660,7 +660,7 @@ \page examples-designer.html \ingroup all-examples \title Qt Designer Examples - \brief Using Qt Designer to build your UI + \brief Using Qt Designer to build your UI. \image designer-examples.png QtDesigner @@ -683,7 +683,7 @@ \page examples-uitools.html \ingroup all-examples \title UiTools Examples - \brief Using the QtUiTools module + \brief Using the QtUiTools module. \image uitools-examples.png UiTools @@ -697,7 +697,7 @@ \page examples-linguist.html \ingroup all-examples \title Qt Linguist Examples - \brief Using Qt Linguist to internationalize your Qt application + \brief Using Qt Linguist to internationalize your Qt application. \image linguist-examples.png @@ -715,7 +715,7 @@ \page examples-script.html \ingroup all-examples \title Qt Script Examples - \brief Using the Qt scripting environment + \brief Using the Qt scripting environment. \image qtscript-examples.png QtScript @@ -742,7 +742,7 @@ \page examples-webkit.html \ingroup all-examples \title WebKit Examples - \brief Using WebKit in your Qt application + \brief Using WebKit in your Qt application. \image webkit-examples.png WebKit @@ -781,7 +781,7 @@ \page examples-helpsystem.html \ingroup all-examples \title Help System Examples - \brief Adding interactive help to your Qt application + \brief Adding interactive help to your Qt application. \image assistant-examples.png HelpSystem @@ -802,7 +802,7 @@ \page examples-statemachine.html \ingroup all-examples \title State Machine Examples - \brief Using Qt's finite state machine classes + \brief Using Qt's finite state machine classes. \image statemachine-examples.png StateMachine @@ -826,7 +826,7 @@ \page examples-animation.html \ingroup all-examples \title Animation Framework Examples - \brief Doing animations with Qt + \brief Doing animations with Qt. \image animation-examples.png Animation @@ -846,7 +846,7 @@ \page examples-touch.html \ingroup all-examples \title Touch Input Examples - \brief Using Qt's touch input capability + \brief Using Qt's touch input capability. Support for touch input makes it possible for developers to create extensible and intuitive user interfaces. @@ -863,7 +863,7 @@ \page examples-gestures.html \ingroup all-examples \title Gestures Examples - \brief Gesture programming examples + \brief Gesture programming examples. The API of the gesture framework is not yet finalized and still subject to change. @@ -877,7 +877,7 @@ \page examples-dbus.html \ingroup all-examples \title D-Bus Examples - \brief Using D-Bus from Qt applications + \brief Using D-Bus from Qt applications. \list \o \l{dbus/dbus-chat}{Chat} @@ -894,7 +894,7 @@ \page examples-embeddedlinux.html \ingroup all-examples \title Qt for Embedded Linux Examples - \brief Using Qt in Embedded Linux + \brief Using Qt in Embedded Linux. \image qt-embedded-examples.png QtEmbedded @@ -914,7 +914,7 @@ \page examples-activeqt.html \ingroup all-examples \title ActiveQt Examples - \brief Using ActiveX from Qt applications + \brief Using ActiveX from Qt applications. \image activeqt-examples.png ActiveQt diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index a5e45d9..a6159c3 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -73,7 +73,7 @@ \snippet examples/tutorials/gettingStarted/gsQml/part0/Button.qml document - First, the \c { import Qt 4.7 } allows the qmlviewer tool to import the QML elements + 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 of Qt modules is included in the import statement. @@ -122,7 +122,7 @@ items can anchor to another item, creating robust layouts. The \c MouseArea has many signal handlers that are called during mouse movements within - the specfied \c MouseArea boundaries. One of them is \c onClicked and it is called + the specified \c MouseArea boundaries. One of them is \c onClicked and it is called 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 @@ -209,7 +209,7 @@ \c FileMenu.qml. \code - import Qt 4.7 \\import the main Qt QML module + import QtQuick 1.0 \\import the main Qt QML module import "folderName" \\import the contents of the folder import "script.js" as Script \\import a Javascript file and name it as Script \endcode @@ -546,7 +546,7 @@ a certain easing curve. An easing curve controls the animation rates and interpolation behavior during state transitions. The easing curve we chose is \l{PropertyAnimation::easing.type}{Easing.OutQuint}, which slows the movement near - the end of the animation. Pleae read \l {qdeclarativeanimation.html}{QML's Animation} + the end of the animation. Please read \l {qdeclarativeanimation.html}{QML's Animation} article. \snippet examples/tutorials/gettingStarted/gsQml/texteditor.qml transitions @@ -835,7 +835,7 @@ \c QDeclarativeListProperty<File>. The template type, \c File, needs to be a \c QObject derivative. Further, to create the \l {QDeclarativeListProperty}{QDeclarativeListProperty}, the list's accessor - and modifiers need to be passed to the consructor as function pointers. The list, + and modifiers need to be passed to the constructor as function pointers. The list, a \c QList in our case, also needs to be a list of \c File pointers. The constructor of \l {QDeclarativeListProperty}{QDeclarativeListProperty} @@ -980,7 +980,7 @@ Our \c FileMenu can now connect to their respective actions. The \c saveButton 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 sloadButton has a similar + 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. Further, the \c EditMenu buttons are connected to the \c TextEdit functions to copy, diff --git a/doc/src/images/qml-column.png b/doc/src/images/qml-column.png Binary files differnew file mode 100644 index 0000000..c589ad8 --- /dev/null +++ b/doc/src/images/qml-column.png diff --git a/doc/src/painting-and-printing/printing.qdoc b/doc/src/painting-and-printing/printing.qdoc index 62c8192..97cd92f 100644 --- a/doc/src/painting-and-printing/printing.qdoc +++ b/doc/src/painting-and-printing/printing.qdoc @@ -136,6 +136,17 @@ used is constructed using the form of the constructor that accepts a QPaintDevice argument. + \section1 Printing Widgets + + To print a widget, you can use the QWidget::render() function. As mentioned, + the printer's resolution is usually higher than the screen resolution, so you + will have to scale the painter. You may also want to position the widget on the + page. The following code sample shows how this may look. + + \snippet doc/src/snippets/widgetprinting.cpp 0 + + This will center the widget on the page and scale it so that it fits the page. + \section1 Printing from Complex Widgets Certain widgets, such as QTextEdit and QGraphicsView, display rich content diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc index 3870e8f..bcf7cb4 100644 --- a/doc/src/platforms/compiler-notes.qdoc +++ b/doc/src/platforms/compiler-notes.qdoc @@ -267,8 +267,9 @@ for more information. There currently is a problem when compiling Qt with Visual Studio 2010 for 64-bit. - Its optimizer causes trouble and crashes for the release builds and it is not supported - in that configuration. See task http://bugreports.qt.nokia.com/browse/QTBUG-11445. + Its optimizer causes trouble and generates code that crashes for the release builds. + To avoid the crashes, You need to apply the hotfix in the following article + http://support.microsoft.com/kb/2280741. \section1 IBM xlC (AIX) diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index fafe007..9bf5c72 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -144,6 +144,8 @@ Smart installer will attempt to download missing dependencies in addition to just installing the application. + \row \o \c unsigned_installer_sis \o Create unsigned \l{Smart Installer}{smart installer} + \c .sis file for project. \row \o \c stub_sis \o Create a stub sis to allow upgradability of projects that are deployed in ROM \endtable diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc index 0436130..379d081 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc +++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc @@ -1004,6 +1004,13 @@ RSS_RULES.footer +="RESOURCE CAPTION_AND_ICON_INFO r_my_icon \{ icon_file =\"$$P //! [151] //! [152] +my_exports = \ + "foo.h /epoc32/include/mylib/foo.h" \ + "bar.h /epoc32/include/mylib/bar.h" +BLD_INF_RULES.prj_exports += my_exports +//! [152] + +//! [153] my_note.pkg_postrules.installer = "\"myinstallnote.txt\" - \"\", FILETEXT, TEXTCONTINUE" DEPLOYMENT += my_note -//! [152] +//! [153] diff --git a/doc/src/snippets/declarative/SelfDestroyingRect.qml b/doc/src/snippets/declarative/SelfDestroyingRect.qml index 413c04e..f89588b 100644 --- a/doc/src/snippets/declarative/SelfDestroyingRect.qml +++ b/doc/src/snippets/declarative/SelfDestroyingRect.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/Sprite.qml b/doc/src/snippets/declarative/Sprite.qml index 3928c4d..3bcd599 100644 --- a/doc/src/snippets/declarative/Sprite.qml +++ b/doc/src/snippets/declarative/Sprite.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 80; height: 50; color: "red" } //![0] diff --git a/doc/src/snippets/declarative/anchoranimation.qml b/doc/src/snippets/declarative/anchoranimation.qml index f149326..d8235f6 100644 --- a/doc/src/snippets/declarative/anchoranimation.qml +++ b/doc/src/snippets/declarative/anchoranimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/doc/src/snippets/declarative/anchorchanges.qml b/doc/src/snippets/declarative/anchorchanges.qml index 19356d7..66c31c5 100644 --- a/doc/src/snippets/declarative/anchorchanges.qml +++ b/doc/src/snippets/declarative/anchorchanges.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: window diff --git a/doc/src/snippets/declarative/animatedimage.qml b/doc/src/snippets/declarative/animatedimage.qml index 66abbae..a9b58c5 100644 --- a/doc/src/snippets/declarative/animatedimage.qml +++ b/doc/src/snippets/declarative/animatedimage.qml @@ -42,7 +42,7 @@ // examples/declarative/imageelements/animatedimage //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: animation.width; height: animation.height + 8 diff --git a/doc/src/snippets/declarative/animation-behavioral.qml b/doc/src/snippets/declarative/animation-behavioral.qml index a4fa648..0462e9a 100644 --- a/doc/src/snippets/declarative/animation-behavioral.qml +++ b/doc/src/snippets/declarative/animation-behavioral.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/animation-easing.qml b/doc/src/snippets/declarative/animation-easing.qml index 97f6e60..3438737 100644 --- a/doc/src/snippets/declarative/animation-easing.qml +++ b/doc/src/snippets/declarative/animation-easing.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/animation-elements.qml b/doc/src/snippets/declarative/animation-elements.qml index a65bd67..7843b75 100644 --- a/doc/src/snippets/declarative/animation-elements.qml +++ b/doc/src/snippets/declarative/animation-elements.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Row { diff --git a/doc/src/snippets/declarative/animation-groups.qml b/doc/src/snippets/declarative/animation-groups.qml index ba546c9..57cc8c2 100644 --- a/doc/src/snippets/declarative/animation-groups.qml +++ b/doc/src/snippets/declarative/animation-groups.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Row { diff --git a/doc/src/snippets/declarative/animation-propertyvaluesource.qml b/doc/src/snippets/declarative/animation-propertyvaluesource.qml index 366505c..ba56afd 100644 --- a/doc/src/snippets/declarative/animation-propertyvaluesource.qml +++ b/doc/src/snippets/declarative/animation-propertyvaluesource.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/animation-signalhandler.qml b/doc/src/snippets/declarative/animation-signalhandler.qml index 492c007..16f27c6 100644 --- a/doc/src/snippets/declarative/animation-signalhandler.qml +++ b/doc/src/snippets/declarative/animation-signalhandler.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/animation-standalone.qml b/doc/src/snippets/declarative/animation-standalone.qml index c847d02..1ff4073 100644 --- a/doc/src/snippets/declarative/animation-standalone.qml +++ b/doc/src/snippets/declarative/animation-standalone.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/animation-transitions.qml b/doc/src/snippets/declarative/animation-transitions.qml index 5b0bb84..025fc90 100644 --- a/doc/src/snippets/declarative/animation-transitions.qml +++ b/doc/src/snippets/declarative/animation-transitions.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/behavior.qml b/doc/src/snippets/declarative/behavior.qml index 7f66e5a..7e2d1e7 100644 --- a/doc/src/snippets/declarative/behavior.qml +++ b/doc/src/snippets/declarative/behavior.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml b/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml index 0ed9943..ba30491 100644 --- a/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml +++ b/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml b/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml index 680709d..98a4175 100644 --- a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml +++ b/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/doc/src/snippets/declarative/borderimage/normal-image.qml b/doc/src/snippets/declarative/borderimage/normal-image.qml index 85a7f52..f8e3c60 100644 --- a/doc/src/snippets/declarative/borderimage/normal-image.qml +++ b/doc/src/snippets/declarative/borderimage/normal-image.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/doc/src/snippets/declarative/codingconventions/dotproperties.qml b/doc/src/snippets/declarative/codingconventions/dotproperties.qml index 8a173cd..98cb09c 100644 --- a/doc/src/snippets/declarative/codingconventions/dotproperties.qml +++ b/doc/src/snippets/declarative/codingconventions/dotproperties.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { diff --git a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml b/doc/src/snippets/declarative/codingconventions/javascript-imports.qml index 391bf27..931349f 100644 --- a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml +++ b/doc/src/snippets/declarative/codingconventions/javascript-imports.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] import "myscript.js" as Script diff --git a/doc/src/snippets/declarative/codingconventions/javascript.qml b/doc/src/snippets/declarative/codingconventions/javascript.qml index 90790b9..6c94626 100644 --- a/doc/src/snippets/declarative/codingconventions/javascript.qml +++ b/doc/src/snippets/declarative/codingconventions/javascript.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { diff --git a/doc/src/snippets/declarative/codingconventions/lists.qml b/doc/src/snippets/declarative/codingconventions/lists.qml index 8d2bdbc..a7f3c8f 100644 --- a/doc/src/snippets/declarative/codingconventions/lists.qml +++ b/doc/src/snippets/declarative/codingconventions/lists.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { Item { diff --git a/doc/src/snippets/declarative/codingconventions/photo.qml b/doc/src/snippets/declarative/codingconventions/photo.qml index 359a756..2eba035 100644 --- a/doc/src/snippets/declarative/codingconventions/photo.qml +++ b/doc/src/snippets/declarative/codingconventions/photo.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //! [0] Rectangle { diff --git a/doc/src/snippets/declarative/coloranimation.qml b/doc/src/snippets/declarative/coloranimation.qml index d904721..452599e 100644 --- a/doc/src/snippets/declarative/coloranimation.qml +++ b/doc/src/snippets/declarative/coloranimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/column/column.qml b/doc/src/snippets/declarative/column/column.qml index 6d378bb..18e95e9 100644 --- a/doc/src/snippets/declarative/column/column.qml +++ b/doc/src/snippets/declarative/column/column.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Item { width: 310; height: 170 @@ -47,21 +47,21 @@ Item { Column { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - + spacing: 5 Rectangle { color: "lightblue"; radius: 10.0 width: 300; height: 50 - Text { anchors.fill: parent - font.pointSize: 32; text: "Books" } } + Text { anchors.centerIn: parent + font.pointSize: 24; text: "Books" } } Rectangle { color: "gold"; radius: 10.0 width: 300; height: 50 - Text { anchors.fill: parent - font.pointSize: 32; text: "Music" } } + Text { anchors.centerIn: parent + font.pointSize: 24; text: "Music" } } Rectangle { color: "lightgreen"; radius: 10.0 width: 300; height: 50 - Text { anchors.fill: parent - font.pointSize: 32; text: "Movies" } } + Text { anchors.centerIn: parent + font.pointSize: 24; text: "Movies" } } } } //! [document] diff --git a/doc/src/snippets/declarative/column/vertical-positioner-transition.qml b/doc/src/snippets/declarative/column/vertical-positioner-transition.qml index 7785776..cd2fdcc 100644 --- a/doc/src/snippets/declarative/column/vertical-positioner-transition.qml +++ b/doc/src/snippets/declarative/column/vertical-positioner-transition.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //! [document] Column { diff --git a/doc/src/snippets/declarative/column/vertical-positioner.qml b/doc/src/snippets/declarative/column/vertical-positioner.qml index 86ecc55..693734b 100644 --- a/doc/src/snippets/declarative/column/vertical-positioner.qml +++ b/doc/src/snippets/declarative/column/vertical-positioner.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //! [document] Column { diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/declarative/comments.qml index aa034c6..a8e47ad 100644 --- a/doc/src/snippets/declarative/comments.qml +++ b/doc/src/snippets/declarative/comments.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 //![0] Text { diff --git a/doc/src/snippets/declarative/component.qml b/doc/src/snippets/declarative/component.qml index 84c063f..ed55803 100644 --- a/doc/src/snippets/declarative/component.qml +++ b/doc/src/snippets/declarative/component.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/createComponent-simple.qml b/doc/src/snippets/declarative/createComponent-simple.qml index f4c240d..f052529 100644 --- a/doc/src/snippets/declarative/createComponent-simple.qml +++ b/doc/src/snippets/declarative/createComponent-simple.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/doc/src/snippets/declarative/createComponent.qml b/doc/src/snippets/declarative/createComponent.qml index f1a7436..619c02d 100644 --- a/doc/src/snippets/declarative/createComponent.qml +++ b/doc/src/snippets/declarative/createComponent.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 import "componentCreation.js" as MyScript Rectangle { diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/declarative/createQmlObject.qml index 6a4eae8..cfcffe1 100644 --- a/doc/src/snippets/declarative/createQmlObject.qml +++ b/doc/src/snippets/declarative/createQmlObject.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: parentItem @@ -48,7 +48,7 @@ Rectangle { function createIt() { //![0] -var newObject = Qt.createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}', +var newObject = Qt.createQmlObject('import QtQuick 1.0; Rectangle {color: "red"; width: 20; height: 20}', parentItem, "dynamicSnippet1"); //![0] diff --git a/doc/src/snippets/declarative/dynamicObjects-destroy.qml b/doc/src/snippets/declarative/dynamicObjects-destroy.qml index b4ae80c..665f631 100644 --- a/doc/src/snippets/declarative/dynamicObjects-destroy.qml +++ b/doc/src/snippets/declarative/dynamicObjects-destroy.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/doc/src/snippets/declarative/flickable.qml b/doc/src/snippets/declarative/flickable.qml index a283e9a..80e7301 100644 --- a/doc/src/snippets/declarative/flickable.qml +++ b/doc/src/snippets/declarative/flickable.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Flickable { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/flickableScrollbar.qml b/doc/src/snippets/declarative/flickableScrollbar.qml index fc06f63..18ea45a 100644 --- a/doc/src/snippets/declarative/flickableScrollbar.qml +++ b/doc/src/snippets/declarative/flickableScrollbar.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/doc/src/snippets/declarative/flipable/flipable.qml b/doc/src/snippets/declarative/flipable/flipable.qml index eaf367a..cd5da4b 100644 --- a/doc/src/snippets/declarative/flipable/flipable.qml +++ b/doc/src/snippets/declarative/flipable/flipable.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [0] -import Qt 4.7 +import QtQuick 1.0 Flipable { id: flipable diff --git a/doc/src/snippets/declarative/flow-diagram.qml b/doc/src/snippets/declarative/flow-diagram.qml index f34e3fd..c970164 100644 --- a/doc/src/snippets/declarative/flow-diagram.qml +++ b/doc/src/snippets/declarative/flow-diagram.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "lightblue" diff --git a/doc/src/snippets/declarative/flow.qml b/doc/src/snippets/declarative/flow.qml index 809627e..167cbdb 100644 --- a/doc/src/snippets/declarative/flow.qml +++ b/doc/src/snippets/declarative/flow.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "lightblue" diff --git a/doc/src/snippets/declarative/focusscopes.qml b/doc/src/snippets/declarative/focusscopes.qml index da6a850..4713c0c 100644 --- a/doc/src/snippets/declarative/focusscopes.qml +++ b/doc/src/snippets/declarative/focusscopes.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/doc/src/snippets/declarative/folderlistmodel.qml b/doc/src/snippets/declarative/folderlistmodel.qml index a5e0071..d1cd34b 100644 --- a/doc/src/snippets/declarative/folderlistmodel.qml +++ b/doc/src/snippets/declarative/folderlistmodel.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.folderlistmodel 1.0 ListView { diff --git a/doc/src/snippets/declarative/gradient.qml b/doc/src/snippets/declarative/gradient.qml index 4c8bd40..47165a4 100644 --- a/doc/src/snippets/declarative/gradient.qml +++ b/doc/src/snippets/declarative/gradient.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![code] Rectangle { diff --git a/doc/src/snippets/declarative/grid/grid-items.qml b/doc/src/snippets/declarative/grid/grid-items.qml index 2382d38..62a444d 100644 --- a/doc/src/snippets/declarative/grid/grid-items.qml +++ b/doc/src/snippets/declarative/grid/grid-items.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 112; height: 112 diff --git a/doc/src/snippets/declarative/grid/grid-no-spacing.qml b/doc/src/snippets/declarative/grid/grid-no-spacing.qml index 6318165..a6ca305 100644 --- a/doc/src/snippets/declarative/grid/grid-no-spacing.qml +++ b/doc/src/snippets/declarative/grid/grid-no-spacing.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 112; height: 112 diff --git a/doc/src/snippets/declarative/grid/grid-spacing.qml b/doc/src/snippets/declarative/grid/grid-spacing.qml index fb3822c..c03cdad 100644 --- a/doc/src/snippets/declarative/grid/grid-spacing.qml +++ b/doc/src/snippets/declarative/grid/grid-spacing.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 112; height: 112 diff --git a/doc/src/snippets/declarative/grid/grid.qml b/doc/src/snippets/declarative/grid/grid.qml index 4599806..837ae60 100644 --- a/doc/src/snippets/declarative/grid/grid.qml +++ b/doc/src/snippets/declarative/grid/grid.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Grid { columns: 3 diff --git a/doc/src/snippets/declarative/gridview/ContactModel.qml b/doc/src/snippets/declarative/gridview/ContactModel.qml index 9fdeb4a..c3c3962 100644 --- a/doc/src/snippets/declarative/gridview/ContactModel.qml +++ b/doc/src/snippets/declarative/gridview/ContactModel.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 ListModel { diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/declarative/gridview/gridview.qml index cbebb0a..73e58ec 100644 --- a/doc/src/snippets/declarative/gridview/gridview.qml +++ b/doc/src/snippets/declarative/gridview/gridview.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![import] -import Qt 4.7 +import QtQuick 1.0 //![import] Rectangle { diff --git a/doc/src/snippets/declarative/image.qml b/doc/src/snippets/declarative/image.qml index 228e83a..4c66ec1 100644 --- a/doc/src/snippets/declarative/image.qml +++ b/doc/src/snippets/declarative/image.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Image { source: "pics/qtlogo.png" diff --git a/doc/src/snippets/declarative/listmodel-modify.qml b/doc/src/snippets/declarative/listmodel-modify.qml index f08137f..d85da6c 100644 --- a/doc/src/snippets/declarative/listmodel-modify.qml +++ b/doc/src/snippets/declarative/listmodel-modify.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/listmodel-nested.qml b/doc/src/snippets/declarative/listmodel-nested.qml index c38ee2d..36c5d66 100644 --- a/doc/src/snippets/declarative/listmodel-nested.qml +++ b/doc/src/snippets/declarative/listmodel-nested.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/listmodel-simple.qml b/doc/src/snippets/declarative/listmodel-simple.qml index e561284..c8e83eb 100644 --- a/doc/src/snippets/declarative/listmodel-simple.qml +++ b/doc/src/snippets/declarative/listmodel-simple.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/listmodel.qml b/doc/src/snippets/declarative/listmodel.qml index 20f2074..f5b6cd6 100644 --- a/doc/src/snippets/declarative/listmodel.qml +++ b/doc/src/snippets/declarative/listmodel.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 ListModel { id: fruitModel diff --git a/doc/src/snippets/declarative/listview/ContactModel.qml b/doc/src/snippets/declarative/listview/ContactModel.qml index f48f84f..d421ffc 100644 --- a/doc/src/snippets/declarative/listview/ContactModel.qml +++ b/doc/src/snippets/declarative/listview/ContactModel.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 ListModel { ListElement { diff --git a/doc/src/snippets/declarative/listview/listview-snippet.qml b/doc/src/snippets/declarative/listview/listview-snippet.qml index d81bcbb..f2a260d 100644 --- a/doc/src/snippets/declarative/listview/listview-snippet.qml +++ b/doc/src/snippets/declarative/listview/listview-snippet.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 ListView { width: 50; height: 200 diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml index 2945b2f..8ba47a8 100644 --- a/doc/src/snippets/declarative/listview/listview.qml +++ b/doc/src/snippets/declarative/listview/listview.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![import] -import Qt 4.7 +import QtQuick 1.0 //![import] Item { diff --git a/doc/src/snippets/declarative/loader/KeyReader.qml b/doc/src/snippets/declarative/loader/KeyReader.qml index 66a74fa..e53700c 100644 --- a/doc/src/snippets/declarative/loader/KeyReader.qml +++ b/doc/src/snippets/declarative/loader/KeyReader.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { Item { diff --git a/doc/src/snippets/declarative/loader/MyItem.qml b/doc/src/snippets/declarative/loader/MyItem.qml index 22c3fd3..199c64a 100644 --- a/doc/src/snippets/declarative/loader/MyItem.qml +++ b/doc/src/snippets/declarative/loader/MyItem.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myItem diff --git a/doc/src/snippets/declarative/loader/connections.qml b/doc/src/snippets/declarative/loader/connections.qml index a1cdce2..18f4259 100644 --- a/doc/src/snippets/declarative/loader/connections.qml +++ b/doc/src/snippets/declarative/loader/connections.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/loader/focus.qml b/doc/src/snippets/declarative/loader/focus.qml index 4b4c940..4b3042a 100644 --- a/doc/src/snippets/declarative/loader/focus.qml +++ b/doc/src/snippets/declarative/loader/focus.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/loader/simple.qml b/doc/src/snippets/declarative/loader/simple.qml index bb06ffc..556ce60 100644 --- a/doc/src/snippets/declarative/loader/simple.qml +++ b/doc/src/snippets/declarative/loader/simple.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml index 85071f1..e2a4ee9 100644 --- a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml +++ b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/mousearea/mousearea.qml b/doc/src/snippets/declarative/mousearea/mousearea.qml index e7764f9..7cd0a77 100644 --- a/doc/src/snippets/declarative/mousearea/mousearea.qml +++ b/doc/src/snippets/declarative/mousearea/mousearea.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [import] -import Qt 4.7 +import QtQuick 1.0 //! [import] Rectangle { diff --git a/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml b/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml index fa0682e..8f9fd47 100644 --- a/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml +++ b/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [dragfilter] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 480 diff --git a/doc/src/snippets/declarative/numberanimation.qml b/doc/src/snippets/declarative/numberanimation.qml index 19c0b0d..8f64493 100644 --- a/doc/src/snippets/declarative/numberanimation.qml +++ b/doc/src/snippets/declarative/numberanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/parallelanimation.qml b/doc/src/snippets/declarative/parallelanimation.qml index caf4e01..0badc03 100644 --- a/doc/src/snippets/declarative/parallelanimation.qml +++ b/doc/src/snippets/declarative/parallelanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/parentanimation.qml b/doc/src/snippets/declarative/parentanimation.qml index b8a4c00..fa49d7a 100644 --- a/doc/src/snippets/declarative/parentanimation.qml +++ b/doc/src/snippets/declarative/parentanimation.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 100 diff --git a/doc/src/snippets/declarative/parentchange.qml b/doc/src/snippets/declarative/parentchange.qml index 72932b2..e73bbb3 100644 --- a/doc/src/snippets/declarative/parentchange.qml +++ b/doc/src/snippets/declarative/parentchange.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 100 diff --git a/doc/src/snippets/declarative/pathview/ContactModel.qml b/doc/src/snippets/declarative/pathview/ContactModel.qml index 62daf3d..07db8dc 100644 --- a/doc/src/snippets/declarative/pathview/ContactModel.qml +++ b/doc/src/snippets/declarative/pathview/ContactModel.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 ListModel { ListElement { diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml index a45f15a..d6dacdb 100644 --- a/doc/src/snippets/declarative/pathview/pathattributes.qml +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240; height: 200 diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml index e03c615..93298c4 100644 --- a/doc/src/snippets/declarative/pathview/pathview.qml +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240; height: 200 diff --git a/doc/src/snippets/declarative/propertyaction.qml b/doc/src/snippets/declarative/propertyaction.qml index 696c9ef..acb5c43 100644 --- a/doc/src/snippets/declarative/propertyaction.qml +++ b/doc/src/snippets/declarative/propertyaction.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Row { diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/declarative/propertyanimation.qml index 24efd60..1f1cbaf 100644 --- a/doc/src/snippets/declarative/propertyanimation.qml +++ b/doc/src/snippets/declarative/propertyanimation.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Row { diff --git a/doc/src/snippets/declarative/propertychanges.qml b/doc/src/snippets/declarative/propertychanges.qml index 06a3fae..00f6bfe 100644 --- a/doc/src/snippets/declarative/propertychanges.qml +++ b/doc/src/snippets/declarative/propertychanges.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![import] -import Qt 4.7 +import QtQuick 1.0 //![import] Column { diff --git a/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml b/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml index 48f2bdb..4aa318c 100644 --- a/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml +++ b/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 250 diff --git a/doc/src/snippets/declarative/qml-data-models/listelements.qml b/doc/src/snippets/declarative/qml-data-models/listelements.qml index 2d12567..44fb056 100644 --- a/doc/src/snippets/declarative/qml-data-models/listelements.qml +++ b/doc/src/snippets/declarative/qml-data-models/listelements.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 250 diff --git a/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml b/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml index 69533c9..53f844a 100644 --- a/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml +++ b/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 250 diff --git a/doc/src/snippets/declarative/qml-documents/inline-component.qml b/doc/src/snippets/declarative/qml-documents/inline-component.qml index 45d7eb4..eef68a3 100644 --- a/doc/src/snippets/declarative/qml-documents/inline-component.qml +++ b/doc/src/snippets/declarative/qml-documents/inline-component.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240; height: 320; diff --git a/doc/src/snippets/declarative/qml-documents/inline-text-component.qml b/doc/src/snippets/declarative/qml-documents/inline-text-component.qml index 1f3af33..593862d 100644 --- a/doc/src/snippets/declarative/qml-documents/inline-text-component.qml +++ b/doc/src/snippets/declarative/qml-documents/inline-text-component.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240; height: 320; diff --git a/doc/src/snippets/declarative/qml-documents/non-trivial.qml b/doc/src/snippets/declarative/qml-documents/non-trivial.qml index e9cba98..ba567b5 100644 --- a/doc/src/snippets/declarative/qml-documents/non-trivial.qml +++ b/doc/src/snippets/declarative/qml-documents/non-trivial.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240; height: 320; diff --git a/doc/src/snippets/declarative/qml-documents/qmldocuments.qml b/doc/src/snippets/declarative/qml-documents/qmldocuments.qml index a4b5589..20efc35 100644 --- a/doc/src/snippets/declarative/qml-documents/qmldocuments.qml +++ b/doc/src/snippets/declarative/qml-documents/qmldocuments.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { property alias text: textItem.text diff --git a/doc/src/snippets/declarative/qml-intro/anchors1.qml b/doc/src/snippets/declarative/qml-intro/anchors1.qml index ba6f928..077eab2 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors1.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myWin diff --git a/doc/src/snippets/declarative/qml-intro/anchors2.qml b/doc/src/snippets/declarative/qml-intro/anchors2.qml index ac60e1b..79f180d 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors2.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors2.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myWin diff --git a/doc/src/snippets/declarative/qml-intro/anchors3.qml b/doc/src/snippets/declarative/qml-intro/anchors3.qml index ab74670..db42e6b 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors3.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors3.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myWin diff --git a/doc/src/snippets/declarative/qml-intro/hello-world1.qml b/doc/src/snippets/declarative/qml-intro/hello-world1.qml index 55b39c6..176f4f4 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world1.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/doc/src/snippets/declarative/qml-intro/hello-world2.qml b/doc/src/snippets/declarative/qml-intro/hello-world2.qml index c537528..98f04ec 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world2.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world2.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/doc/src/snippets/declarative/qml-intro/hello-world3.qml b/doc/src/snippets/declarative/qml-intro/hello-world3.qml index 794c406..abf684c 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world3.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world3.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/doc/src/snippets/declarative/qml-intro/hello-world4.qml b/doc/src/snippets/declarative/qml-intro/hello-world4.qml index 7ea4bed..de794ca 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world4.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world4.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/doc/src/snippets/declarative/qml-intro/hello-world5.qml b/doc/src/snippets/declarative/qml-intro/hello-world5.qml index 3345882..95ec6c8 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world5.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world5.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/doc/src/snippets/declarative/qml-intro/number-animation1.qml b/doc/src/snippets/declarative/qml-intro/number-animation1.qml index 64ebe7a..aa5c109 100644 --- a/doc/src/snippets/declarative/qml-intro/number-animation1.qml +++ b/doc/src/snippets/declarative/qml-intro/number-animation1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRec diff --git a/doc/src/snippets/declarative/qml-intro/number-animation2.qml b/doc/src/snippets/declarative/qml-intro/number-animation2.qml index 7905002..9c6a4bc 100644 --- a/doc/src/snippets/declarative/qml-intro/number-animation2.qml +++ b/doc/src/snippets/declarative/qml-intro/number-animation2.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRec diff --git a/doc/src/snippets/declarative/qml-intro/rectangle.qml b/doc/src/snippets/declarative/qml-intro/rectangle.qml index 1ce0a04..ccfa514 100644 --- a/doc/src/snippets/declarative/qml-intro/rectangle.qml +++ b/doc/src/snippets/declarative/qml-intro/rectangle.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 // This is a comment. And below myRectangle is defined. Rectangle { diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml index a1a1af9..3ff1905 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRec diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml index f83c224..47c8d6a 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRec diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml index 32bf59c..530907a 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml @@ -38,10 +38,10 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRec diff --git a/doc/src/snippets/declarative/qml-intro/states1.qml b/doc/src/snippets/declarative/qml-intro/states1.qml index 6e7bab1..e63551a 100644 --- a/doc/src/snippets/declarative/qml-intro/states1.qml +++ b/doc/src/snippets/declarative/qml-intro/states1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRectangle diff --git a/doc/src/snippets/declarative/qml-intro/transformations1.qml b/doc/src/snippets/declarative/qml-intro/transformations1.qml index 7ca3aee..2fea733 100644 --- a/doc/src/snippets/declarative/qml-intro/transformations1.qml +++ b/doc/src/snippets/declarative/qml-intro/transformations1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myWin diff --git a/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml index 341765a..425346d 100644 --- a/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml +++ b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300 diff --git a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml index ea8464c..a20d9e0 100644 --- a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml +++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/doc/src/snippets/declarative/qtbinding/resources/main.qml b/doc/src/snippets/declarative/qtbinding/resources/main.qml index b12af9e..644d963 100644 --- a/doc/src/snippets/declarative/qtbinding/resources/main.qml +++ b/doc/src/snippets/declarative/qtbinding/resources/main.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Image { source: "images/background.png" diff --git a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml index 75c0831..f894f71 100644 --- a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml +++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300 diff --git a/doc/src/snippets/declarative/qtobject.qml b/doc/src/snippets/declarative/qtobject.qml index 581af16..e6e98c2 100644 --- a/doc/src/snippets/declarative/qtobject.qml +++ b/doc/src/snippets/declarative/qtobject.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { QtObject { diff --git a/doc/src/snippets/declarative/rectangle/rect-border-width.qml b/doc/src/snippets/declarative/rectangle/rect-border-width.qml index 3cf0831..3b2a4e5 100644 --- a/doc/src/snippets/declarative/rectangle/rect-border-width.qml +++ b/doc/src/snippets/declarative/rectangle/rect-border-width.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/doc/src/snippets/declarative/rectangle/rectangle-colors.qml b/doc/src/snippets/declarative/rectangle/rectangle-colors.qml index 8f306f6..df364bc 100644 --- a/doc/src/snippets/declarative/rectangle/rectangle-colors.qml +++ b/doc/src/snippets/declarative/rectangle/rectangle-colors.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 100; height: 200 diff --git a/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml b/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml index aff5849..d727e84 100644 --- a/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml +++ b/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 100; height: 300 diff --git a/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml b/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml index e1d6980..4cb1050 100644 --- a/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml +++ b/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 200 diff --git a/doc/src/snippets/declarative/rectangle/rectangle.qml b/doc/src/snippets/declarative/rectangle/rectangle.qml index a464cb9..7bb7c58 100644 --- a/doc/src/snippets/declarative/rectangle/rectangle.qml +++ b/doc/src/snippets/declarative/rectangle/rectangle.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100 diff --git a/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml b/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml index dbf24ae..4835cfe 100644 --- a/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml +++ b/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 400; color: "black" diff --git a/doc/src/snippets/declarative/repeaters/repeater.qml b/doc/src/snippets/declarative/repeaters/repeater.qml index db606d0..f3a5505 100644 --- a/doc/src/snippets/declarative/repeaters/repeater.qml +++ b/doc/src/snippets/declarative/repeaters/repeater.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [import] -import Qt 4.7 +import QtQuick 1.0 //! [import] Row { diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/declarative/rotation.qml index 4db8b4a..7366775 100644 --- a/doc/src/snippets/declarative/rotation.qml +++ b/doc/src/snippets/declarative/rotation.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //! [0] -import Qt 4.7 +import QtQuick 1.0 Row { x: 10; y: 10 diff --git a/doc/src/snippets/declarative/rotationanimation.qml b/doc/src/snippets/declarative/rotationanimation.qml index 2309d0a..c907287 100644 --- a/doc/src/snippets/declarative/rotationanimation.qml +++ b/doc/src/snippets/declarative/rotationanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 300; height: 300 diff --git a/doc/src/snippets/declarative/row.qml b/doc/src/snippets/declarative/row.qml index efb6190..4e4bdd3 100644 --- a/doc/src/snippets/declarative/row.qml +++ b/doc/src/snippets/declarative/row.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 320; height: 110 diff --git a/doc/src/snippets/declarative/row/row.qml b/doc/src/snippets/declarative/row/row.qml index 8096c0f..b19bdc2 100644 --- a/doc/src/snippets/declarative/row/row.qml +++ b/doc/src/snippets/declarative/row/row.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Row { spacing: 2 diff --git a/doc/src/snippets/declarative/sequentialanimation.qml b/doc/src/snippets/declarative/sequentialanimation.qml index 1a17ae9..c8788ac 100644 --- a/doc/src/snippets/declarative/sequentialanimation.qml +++ b/doc/src/snippets/declarative/sequentialanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/smoothedanimation.qml b/doc/src/snippets/declarative/smoothedanimation.qml index edc33db..06e1555 100644 --- a/doc/src/snippets/declarative/smoothedanimation.qml +++ b/doc/src/snippets/declarative/smoothedanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800; height: 600 diff --git a/doc/src/snippets/declarative/springanimation.qml b/doc/src/snippets/declarative/springanimation.qml index fe5aeb8..2051dbe 100644 --- a/doc/src/snippets/declarative/springanimation.qml +++ b/doc/src/snippets/declarative/springanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 300; height: 300 diff --git a/doc/src/snippets/declarative/state-when.qml b/doc/src/snippets/declarative/state-when.qml index 6dbd099..583f3ba 100644 --- a/doc/src/snippets/declarative/state-when.qml +++ b/doc/src/snippets/declarative/state-when.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { id: myRect diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/declarative/state.qml index 8597314..07fd21b 100644 --- a/doc/src/snippets/declarative/state.qml +++ b/doc/src/snippets/declarative/state.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRect diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/declarative/states.qml index be483af..ee110aa 100644 --- a/doc/src/snippets/declarative/states.qml +++ b/doc/src/snippets/declarative/states.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRect diff --git a/doc/src/snippets/declarative/systempalette.qml b/doc/src/snippets/declarative/systempalette.qml index 5e540b9..53410a1 100644 --- a/doc/src/snippets/declarative/systempalette.qml +++ b/doc/src/snippets/declarative/systempalette.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } diff --git a/doc/src/snippets/declarative/text/onLinkActivated.qml b/doc/src/snippets/declarative/text/onLinkActivated.qml index 0fb236a..e9fd431 100644 --- a/doc/src/snippets/declarative/text/onLinkActivated.qml +++ b/doc/src/snippets/declarative/text/onLinkActivated.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 700; height: 400 diff --git a/doc/src/snippets/declarative/texteditor.qml b/doc/src/snippets/declarative/texteditor.qml index 55438f4..5596140 100644 --- a/doc/src/snippets/declarative/texteditor.qml +++ b/doc/src/snippets/declarative/texteditor.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Flickable { diff --git a/doc/src/snippets/declarative/transition-from-to.qml b/doc/src/snippets/declarative/transition-from-to.qml index 73bf880..4fe39c5 100644 --- a/doc/src/snippets/declarative/transition-from-to.qml +++ b/doc/src/snippets/declarative/transition-from-to.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/doc/src/snippets/declarative/transition-reversible.qml b/doc/src/snippets/declarative/transition-reversible.qml index b64cf37..e3fec2f 100644 --- a/doc/src/snippets/declarative/transition-reversible.qml +++ b/doc/src/snippets/declarative/transition-reversible.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/doc/src/snippets/declarative/transition.qml b/doc/src/snippets/declarative/transition.qml index 6a8a2f5..9154c3c 100644 --- a/doc/src/snippets/declarative/transition.qml +++ b/doc/src/snippets/declarative/transition.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/visualdatamodel.qml b/doc/src/snippets/declarative/visualdatamodel.qml index 67f9b6b..e9ad800 100644 --- a/doc/src/snippets/declarative/visualdatamodel.qml +++ b/doc/src/snippets/declarative/visualdatamodel.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 100 diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml b/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml index 10bcfe8..bceaac8 100644 --- a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml +++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 ListView { id: view diff --git a/doc/src/snippets/declarative/workerscript.qml b/doc/src/snippets/declarative/workerscript.qml index 434a90e..95e787c 100644 --- a/doc/src/snippets/declarative/workerscript.qml +++ b/doc/src/snippets/declarative/workerscript.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 300 diff --git a/doc/src/snippets/declarative/xmlrole.qml b/doc/src/snippets/declarative/xmlrole.qml index 9c8af89..efa59eb 100644 --- a/doc/src/snippets/declarative/xmlrole.qml +++ b/doc/src/snippets/declarative/xmlrole.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 200 diff --git a/doc/src/snippets/widgetprinting.cpp b/doc/src/snippets/widgetprinting.cpp new file mode 100644 index 0000000..47839d8 --- /dev/null +++ b/doc/src/snippets/widgetprinting.cpp @@ -0,0 +1,93 @@ +/**************************************************************************** +** +** 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:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtGui> + +class Window : public QWidget +{ + Q_OBJECT + +public: + Window() { + myWidget = new QPushButton("Print Me"); + connect(myWidget, SIGNAL(clicked()), this, SLOT(print())); + + QVBoxLayout *layout = new QVBoxLayout; + layout->addWidget(myWidget); + setLayout(layout); + } + +private slots: + void print() { + QPrinter printer(QPrinter::HighResolution); + + printer.setOutputFileName("test.pdf"); + +//! [0] + QPainter painter; + painter.begin(&printer); + double xscale = printer.pageRect().width()/double(myWidget->width()); + double yscale = printer.pageRect().height()/double(myWidget->height()); + double scale = qMin(xscale, yscale); + painter.translate(printer.paperRect().x() + printer.pageRect().width()/2, + printer.paperRect().y() + printer.pageRect().height()/2); + painter.scale(scale, scale); + painter.translate(-width()/2, -height()/2); + + myWidget->render(&painter); +//! [0] + } + +private: + QPushButton *myWidget; +}; + +int main(int argv, char **args) +{ + QApplication app(argv, args); + + Window window; + window.show(); + + return app.exec(); +} + +#include "main.moc" + diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index b60aa41..614e296 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -837,6 +837,9 @@ padding-left: 25px; padding-top: 10px; } + .wrap .content ul img { + vertical-align:middle; + } a:hover { color: #4c0033; @@ -898,6 +901,7 @@ margin-left:10px; min-width:250px; line-height: 1.2; + min-width:100%; } |