2 QT Quick Fundamentals Slides
2 QT Quick Fundamentals Slides
Tod Gentille
www.syncorsystems.com
@todgentille
Overview
Basic Types
QML Object
Nesting
Attributes
Importing
Commenting
Components
Basic Language Types
C++ Types
Basic types no
import required
The Basic Types
int
bool
real
double
string
url
list
enumeration
var
Qt Quick Imported Types
color
font
matrix 4x4
quaternion
vector2D
vector3d
date
point
size
rect
The Key to Defining Colors
Global Objects
• qsTr
• font
Qt •
•
lighter
darker
Qt.quit() •
•
resolvedUrl
size
• quit
QML • XMLHttpRequest
• Offline Storage/Database APIs
console.log() • Logging
QML Common Font Properties
Working with Dates
Qdate date
C++ Types
a topic for another day
QML Object Declaration
Name
Delimiters
id attribute
property
Attributes
id
properties
signals
signal handlers
methods
attached properties
id Attribute
titleCase required
Variant properties
onFirstStringChanged
on_FirstStringChanged
Alias Properties
Example Custom Property Usage
Grouped Properties
Property Aliases
Property Scope
Building Components
Summary
Basic types
Imported types
Control types
Label
TextField
Object Creation
Attributes,Nesting
Custom Components
Alias property