summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/declarative')
-rw-r--r--doc/src/declarative/advtutorial.qdoc3
-rw-r--r--doc/src/declarative/anchor-layout.qdoc3
-rw-r--r--doc/src/declarative/globalobject.qdoc4
-rw-r--r--doc/src/declarative/qdeclarativeintro.qdoc27
-rw-r--r--doc/src/declarative/qml-intro.qdoc2
-rw-r--r--doc/src/declarative/qtbinding.qdoc9
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc2
-rw-r--r--doc/src/declarative/qtprogrammers.qdoc2
8 files changed, 32 insertions, 20 deletions
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
index 6cd1f22..263c78b 100644
--- a/doc/src/declarative/advtutorial.qdoc
+++ b/doc/src/declarative/advtutorial.qdoc
@@ -41,7 +41,7 @@ included in the declarative \c demos directory, which looks like this:
\image declarative-samegame.png
We will cover concepts for producing a fully functioning application, including
-JavaScript integration, using QML \l States and \l {Behavior}{Behaviors} to
+JavaScript integration, using QML \l{State}{States} and \l{Behavior}{Behaviors} to
manage components and enhance your interface, and storing persistent application data.
An understanding of JavaScript is helpful to understand parts of this tutorial, but if you don't
@@ -462,5 +462,4 @@ By following this tutorial you've seen how you can write a fully functional appl
There is so much more to learn about QML that we haven't been able to cover in this tutorial. Check out all the
demos and examples and the \l {Qt Quick}{documentation} to see all the things you can do with QML!
-
*/
diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc
index e567ae1..0655fdb 100644
--- a/doc/src/declarative/anchor-layout.qdoc
+++ b/doc/src/declarative/anchor-layout.qdoc
@@ -78,6 +78,9 @@ Rectangle { id: rect3; x: 150; ... }
\image edge4.png
+There are also some convenience anchors. anchors.fill is a convenience that is the same as setting the left,right,top and bottom anchors
+to the left,right,top and bottom of the target item. anchors.centerIn is another convenience anchor, and is the same as setting the verticalCenter
+and horizontalCenter anchors to the verticalCenter and horizontalCenter of the target item.
\section1 Anchor Margins and Offsets
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
index 8671b48..2568f81 100644
--- a/doc/src/declarative/globalobject.qdoc
+++ b/doc/src/declarative/globalobject.qdoc
@@ -48,7 +48,7 @@ data from over a network.
The XMLHttpRequest API implements the same \l {http://www.w3.org/TR/XMLHttpRequest/}{W3C standard}
as many popular web browsers with following exceptions:
\list
-\i QML's XMLHttpRequest does not enforce the same origin policty.
+\i QML's XMLHttpRequest does not enforce the same origin policy.
\i QML's XMLHttpRequest does not support \e synchronous requests.
\endlist
@@ -77,7 +77,7 @@ browser. The following objects and properties are supported by the QML implemen
\o lastChild
\o previousSibling
\o nextSibling
-\o attribtes
+\o attributes
\endlist
\o
diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc
index 4b7dce5..02692de 100644
--- a/doc/src/declarative/qdeclarativeintro.qdoc
+++ b/doc/src/declarative/qdeclarativeintro.qdoc
@@ -27,7 +27,7 @@
/*!
\page qdeclarativeintroduction.html
-\title Introduction to the QML language
+\title Introduction to the QML Language
\tableofcontents
@@ -121,7 +121,7 @@ line opacity: 0.5 has been turned into a comment.
-\section1 Object identifiers
+\section1 Object Identifiers
Each object can be given a special \e id value that allows the object to be identified
and referred to by other objects.
@@ -160,19 +160,19 @@ characters other than letters, numbers and underscores.
JavaScript expressions can be used to assign property values. For example:
-\code
+\qml
Item {
width: 100 * 3
height: 50 + 22
}
-\endcode
+\endqml
These expressions can include references to other objects and properties, in which case
a \l{Property Binding}{binding} is established: when the value of the expression changes,
the property to which the expression is assigned is automatically updated to the
new value. For example:
-\code
+\qml
Item {
width: 300
height: 300
@@ -183,7 +183,7 @@ Item {
color: "yellow"
}
}
-\endcode
+\endqml
Here, the \l Rectangle object's \c width property is set relative to the width
of its parent. Whenever the parent's width changes, the width of the \l Rectangle is
@@ -194,7 +194,7 @@ automatically updated.
\section1 Properties
\target intro-properties
-\section2 Basic property types
+\section2 Basic Property Types
QML supports properties of many types (see \l{QML Basic Types}). The basic types include \c int,
\c real, \c bool, \c string and \c color.
@@ -222,7 +222,7 @@ Note that with the exception of \l {Attached Properties}, properties always begi
letter.
-\section2 Property change notifications
+\section2 Property Change Notifications
When a property changes value, it can send a signal to notify others of this change.
@@ -271,7 +271,7 @@ Items in the list can be accessed by index. See the \l{list}{list type} document
for more details about list properties and their available operations.
-\section2 Default properties
+\section2 Default Properties
Each object type can specify one of its list or object properties as its default property.
If a property has been declared as the default property, the property tag can be omitted.
@@ -330,7 +330,7 @@ element that attaches \e property.
For example, the \l ListView element attaches the \e ListView.isCurrentItem property
to each delegate it creates:
-\code
+\qml
Component {
id: myDelegate
Text {
@@ -338,10 +338,13 @@ Component {
color: ListView.isCurrentItem ? "red" : "blue"
}
}
+\endqml
+
+\qml
ListView {
delegate: myDelegate
}
-\endcode
+\endqml
Another example of attached properties is the \l Keys element which
attaches properties for handling key presses to
@@ -390,6 +393,4 @@ MouseArea {
}
}
\endqml
-
-
*/
diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc
index 7b2d999..3f3e0e4 100644
--- a/doc/src/declarative/qml-intro.qdoc
+++ b/doc/src/declarative/qml-intro.qdoc
@@ -61,7 +61,7 @@ The basic syntax of an \l{QML Elements}{element} is
\qml
SomeElement {
id: myObject
- ... some other things here ...
+ // ... some other things here ...
}
\endqml
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index 4213f66..03290aa 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -235,6 +235,10 @@ defined by C++ classes; in fact, many of the core \l {QML Elements} are implemen
C++ classes. When you create a QML object using one of these elements, you are simply creating an
instance of a QObject-based C++ class and setting its properties.
+To create a visual item that fits in with the Qt Quick elements, base your class off \l QDeclarativeItem instead of QObject directly.
+You can then implement your own painting and functionality like any other QGraphicsObject. Note that QGraphicsItem::ItemHasNoContents is set by default on QDeclarativeItem because
+it does not paint anything; you will need to clear this if your item is supposed to paint anything (as opposed to being solely for input handling or logical grouping).
+
For example, here is an \c ImageViewer class with an \c image URL property:
\snippet doc/src/snippets/declarative/qtbinding/newelements/imageviewer.h 0
@@ -249,6 +253,11 @@ Then, any QML code loaded by your C++ application or \l{QDeclarativeExtensionPlu
\snippet doc/src/snippets/declarative/qtbinding/newelements/standalone.qml 0
+
+It is advised that you avoid using QGraphicsItem functionality beyond the properties documented in QDeclarativeItem.
+This is because the GraphicsView backend is intended to be an implementation detail for QML, so the QtQuick items can be moved to faster backends as they become available with no change from a QML perspective.
+To minimize any porting requirements for custom visual items, try to stick to the documented properties in QDeclarativeItem where possible. Properties QDeclarativeItem inherits but doesn't document are classed as implementation details; they are not officially supported and may disappear between releases.
+
Note that custom C++ types do not have to inherit from QDeclarativeItem; this is only necessary if it is
a displayable item. If the item is not displayable, it can simply inherit from QObject.
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index 364711d..e8a1c24 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -56,7 +56,7 @@
\macro QML_DECLARE_TYPE()
\relates QDeclarativeEngine
- Equivalent to \c Q_DECLARE_METATYPE(TYPE) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>)
+ Equivalent to \c Q_DECLARE_METATYPE(TYPE *) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty<TYPE>)
#include <QtDeclarative> to use this macro.
*/
diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc
index 7895c9f..b7d09a1 100644
--- a/doc/src/declarative/qtprogrammers.qdoc
+++ b/doc/src/declarative/qtprogrammers.qdoc
@@ -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 mechanism for selecting among them (the QTabBar). A QScollArea provides scrollbars around
+and a mechanism for selecting among them (the QTabBar). A QScrollArea 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