qt-quick-for-designers-1:layout_basics
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
qt-quick-for-designers-1:layout_basics [2013/06/21 21:23] – created; splif off from "Layout and Interaction" mithat | qt-quick-for-designers-1:layout_basics [2013/07/06 23:04] (current) – [Element] mithat | ||
---|---|---|---|
Line 5: | Line 5: | ||
* Structures in the QML markup language are called **elements**. | * Structures in the QML markup language are called **elements**. | ||
* Some elements are //visual// (e.g., images, shapes). | * Some elements are //visual// (e.g., images, shapes). | ||
+ | * A visual element is an **Item**. | ||
* Some elements are // | * Some elements are // | ||
Line 13: | Line 14: | ||
* '' | * '' | ||
* The following creates an Item of size 100 pixels by 100 pixels (but it shows nothing): | * The following creates an Item of size 100 pixels by 100 pixels (but it shows nothing): | ||
- | |||
<file javascript item-example.qml> | <file javascript item-example.qml> | ||
import QtQuick 1.0 | import QtQuick 1.0 | ||
Line 22: | Line 22: | ||
} | } | ||
</ | </ | ||
+ | * '' | ||
+ | * You can place multiple properties on the same line if you separate them with semicolons: | ||
+ | <code javascript> | ||
+ | Item { | ||
+ | | ||
+ | } | ||
+ | </ | ||
===== Rectangle ===== | ===== Rectangle ===== | ||
Line 35: | Line 42: | ||
| | ||
| | ||
- | | ||
- | } | ||
- | </ | ||
- | * You can place multiple properties on the same line if you separate them with semicolons: | ||
- | <file javascript rectangle-example2.qml> | ||
- | import QtQuick 1.0 | ||
- | |||
- | Rectangle { | ||
- | | ||
- | | ||
| | ||
} | } | ||
Line 154: | Line 151: | ||
===== Naming things ===== | ===== Naming things ===== | ||
* Elements can be named using the '' | * Elements can be named using the '' | ||
- | * You often need to name an element so you can access | + | * You often need to name an element so you can refer to it from outside itself. |
<code javascript> | <code javascript> | ||
Line 177: | Line 174: | ||
</ | </ | ||
+ | -------------------------------------------------------------- | ||
+ | ====== Resources ====== | ||
+ | * {{: | ||
+ | * All source code is subject to this [[copyright header|copyright]]. |
qt-quick-for-designers-1/layout_basics.1371849833.txt.gz · Last modified: 2013/06/21 21:23 by mithat