Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Integrated

Computer www.ics.com Updated for Qt 5.6


Solutions

QML Quick Reference

Basic Syntax Qt Quick Object Types (“import QtQuick 2.6”) Qt Quick Window QML Types
(“import QtQuick.Dialogs 2.2”)
// Simple QML example
Visual Types User Imput Positioning
import QtQuick 2.6 ColorDialog FileDialog MessageDialog
Rectangle { Accessible ItemLoader SystemPalette DoubleValidator KeyEvent PinchEvent Column
Dialog FontDialog
width: 640 AnimatedImage Rectangle Text Drag KeyNavigation RegExpValidator Flow
height: 480 AnimatedSprite Repeater Transform DragEvent Keys Shortcut Grid
Text { BorderImage Rotation Translate DropArea MouseArea TextEditTextInput LayoutMirroring Qt Quick Dialogs QML Types
anchors.centerIn: parent FontLoader Scale Window EnterKey MouseEvent TouchPoint Positioner
Gradient Screen Flickable MultiPoint WheelEvent Row
(“import QtQuick.Dialogs 1.2”)
text: “Hello, world!”
} GradientStop Sprite FocusScope TouchArea
Image SpriteSequence IntValidator PinchArea ColumnLayout Layout
MouseArea {
GridLayout RowLayout
anchors.fill: parent
onClicked: {
States, Transitions and Animations Qt Test
Qt.quit()
} AnchorAnimatio ParallelAnimation PathCurve Property Sequential StateGroup SignalSpy Other QML Modules
} AnchorChanges ParentAnimatio PathInterpolator Animation Animation Transition TestCase
QtAudioEngine 1.0 QtTest 1.0
} Animation ParentChange PathLine Property Changes Smoothed UniformAnimator
Enginio 1.0 QtWebChannel 1.0
Controller Path PathPercent Rotation Animation Vector3dAnimation
Qt.labs.calendar 1.0 QtWebEngine 1.2
Behavior PathAnimation PathQuad Animation SpringAnimation ViewTransition
Qt.labs.controls 1.0 QtWebSockets 1.0
ColorAnimation PathArc PathSvg RotationAnimator State XAnimator
Qt.labs.folderlistmodel 2.1 QtWebView 1.0
QML Basic Types NumberAnimation PathAttribute PauseAnimation ScaleAnimator StateChange YAnimator
Qt.labs.settings 1.0
OpacityAnimator PathCubic PropertyAction ScriptAction Script
bool double enumeration Qt.labs.templates 1.0
int list real Qt3D.Core 2.0
string url var Model/View Convenience Graphical Effects Canvas Qt3D.Input 2.0
Qt3D.Logic 2.0
GridView VisualDataGroup Binding TextMetrics Flipable Canvas
Qt3D.Render 2.0
ListElement VisualDataModel Connections Timer GridMesh CanvasGradient
Qt Quick Basic Types QtBluetooth 5.6
ListModel VisualItemModel FontMetrics WorkerScript ShaderEffect CanvasImageData
QtCanvas3D 1.1
(“import QtQuick 2.6”) ListView XmlListModel ItemGrabResult ShaderEffect CanvasPixelArray
QtGraphicalEffects 1.0
Package XmlRole Matrix4x4 Source Context2D
QtLocation 5.6
color date font PathView OpenGLInfo TextMetrics
QtMultimedia 5.6
matrix4x4 point quaternion
QtNfc 5.6
rect size vector2d
QtPositioning 5.6
vector3d vector4d Qt Quick Particles QML Types Qt Quick Controls QML Types QtQml 2.2
(“import QtQuick.Particles 2.0”) (“import QtQuick.Controls 1.5”) QtQml.Models 2.3
Qt Quick XmlListModel QtQml.StateMachine 1.0
Affector ImageParticle TargetDirection Action MenuItem Switch QtQuick 2.6
QML Types (“import Age ItemParticle TrailEmitter ApplicationWindow MenuSeparator Tab QtQuick.Controls 1.5
QtQuick.XmlListModel 2.0”) AngleDirection LineShape Turbulence BusyIndicator ProgressBar TabView QtQuick.Dialogs 1.2
Attractor MaskShape Wander Button RadioButton TableView QtQuick.Extras 1.4
XmlListModel XmlRole CumulativeDirection Particle Calendar ScrollView TableView QtQuick.Layouts 1.2
CustomParticle ParticleGroup CheckBox Slider Column QtQuick.LocalStorage 2.0
Direction ParticlePainter ComboBox SpinBox TextArea QtQuick.Particles 2.0
Qt Quick Layouts QML Types EllipseShape ParticleSystem ExclusiveGroup SplitView TextField QtQuick.PrivateWidgets 1.1
(“import QtQuick.Layouts 1.3”) Emitter PointDirection GroupBox Stack ToolBar QtQuick.Scene3D 2.0
Friction RectangleShape Label StackView ToolButton QtQuick.Window 2.2
CloseEvent StackLayout Gravity Shape Menu StackViewDelegate TreeView QtQuick.XmlListModel 2.0
Screen Window GroupGoal SpriteGoal MenuBar StatusBar QtSensors 5.6

Qt 5.6.0, 16-March-2016 Copyright © 2016 Integrated Computer Solutions, Inc. Page 1 of 2


QML Item Properties QML Program Options QML JavaScript
Debugger Options
activeFocus anchors.left childrenRect.width layer.samplerName states Usage: qml [options] [files]
activeFocusOnTab anchors.leftMargin childrenRect.x layer.smooth transform General Options: Run application with option -qmljs-
anchors nchors.margins childrenRect.y layer.sourceRect transformOrigin -h, -help.................................Print this usage information and exit debugger=port:port from[,port to]
anchors.align anchors.right clip layer.textureSize transitions -v, -version............................Print the version information and exit [,host:ip address][,block]
WhenCentered anchors.rightMargin data layer.textureMirroring visible -apptype [core|gui|widget]....Select which application class to use
anchors.baseline anchors.top enabled layer.wrapMode visibleChildren .Default is gui
anchors.baselineOffset anchors.topMargin focus objectName width -quiet.....................................Suppress all output
anchors.bottom anchors.verticalCenter height opacity x -I [path]..................................Prepend the given path to the import paths
anchors.bottomMargin anchors.vertical implicitHeight parent y -f [file]....................................Load the given file as a QML file
anchors.centerIn CenterOffset implicitWidth resources z -config [file]...........................Load the given file as the configuration file
anchors.fill antialiasing layer.effect rotation -- Arguments after this one are ignored by the launcher, but may be used within the
anchors.horizontalCenter baselineOffset layer.enabled scale QML application
anchors.horizontal children layer.format smooth
GL options:
CenterOffset childrenRect.height layer.mipmap state
-desktop................................Force use of desktop GL
-gles......................................Force use of GLES
QML Global Object QML Item Methods -software...............................Force use of software rendering
-scaling..................................Enable High DPI scaling
Qt Object childAt mapFromItem -no-scaling............................Disable High DPI scaling
application hsva qsTrNoOp() contains mapToItem
Debugging options:
atob() include() qsTranslate() forceActiveFocus nextItemInFocusChain -verbose................................Print information about what QML is doing, like specific file URLs being loaded
binding() inputMethod qsTranslateNoOp() grabToImage -translation [file]....................Load the given file as the translations file
btoa() isQtObject() quatenion() -dummy-data [directory].......Load QML files from the given directory as context properties
colorEqual() lighter() quit() -slow-animations...................Run all animations in slow motion
createComponent() locale() rect() QML Profiler Options -fixed-animations..................Run animations off animation tick rather than wall time
createQmlObject() matrix4x4() resolvedUrl()
qmlprofiler [options] [program] [program-options] Can make QML files executable on Linux/Unix/POSIX systems by adding first line like the following: #!/usr/bin/env qml
darker() md5() rgba()
font() openUrlExternally() size() qmlprofiler [options] -a,-attach <hostname>
fontFamilies() platform styleHints Options:
formatDate() point() tint()
QML Environment Variables
-p,--port <number>....... TCP/IP port to use,
formatDateTime() qsTr() vector2d() default is 3768 QML2_IMPORT_PATH QSG_FIXED_ANIMATION_STEP
formatTime() qsTrld() vector3d() -o,--output <file>........... Save tracing data in <file> QMLSCENE_DEVICE QSG_INFO
hsla() qsTrldNoOp() vector4d()
--record <on|off>.............Controls whether recording QMLSCENE_IMPORT_NAME QSG_NO_DEPTH_BUFFER
starts immediately QML_ANIMATION_TICK_DUMP QSG_NO_STENCIL_BUFFER
--include <feature,...>..... Comma-separated list QML_BAD_GUI_RENDER_LOOP QSG_OPENGL_DEBUG
Qmlscene Options
of features to include QML_CHECK_TYPES QSG_PREFER_FULLSIZE_GLYPHCACHE_TEXTURES
Usage: qmlscene [options] filename when recording QML_DEBUG_LEAK_BACKTRACE QSG_RENDERER_BATCH_NODE_THRESHOLD
Options: --exclude <feature,...>.... Comma-separated list QML_DISABLE_DISTANCEFIELD QSG_RENDERER_BATCH_VERTEX_THRESHOLD
--maximized..........................Run maximized of features to exclude QML_DUMP_ERRORS QSG_RENDERER_BUFFER_STRATEGY
--fullscreen............................Run fullscreen when recording QML_FBO_FLUSH_BEFORE_DETACH QSG_RENDERER_DEBUG
--transparent.........................Make the window transparent --interactive................... Manually control the QML_FBO_OVERLAY QSG_RENDER_LOOP
--multisample........................Enable multisampling recording from the QML_FORCE_THREADED_RENDERER QSG_RENDER_TIMING
(OpenGL anti-aliasing) command line QML_IMPORT_TRACE QSG_TRANSIENT_IMAGES
--no-version-detection............ Do not try to detect the version of the .qml file QML_LEAK_CHECK QSG_VISUALIZE
--verbose....................... Print debugging output
--slow-animations.................Run all animations in slow motion QML_LOOKUP_HINTS QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING
-h,--help........................ Displays help information
--resize-to-root......................Resize the window to the size of the root item QML_NO_TOUCH_COMPRESSION QT_QUICK_CORE_PROFILE
-v,--version.................... Displays version
--quit......................................Quit immediately after starting QML_PARENT_TEST QV4_FORCE_INTERPRETER
information
--disable-context-sharing.....Disable the use of a shared GL context for QML_PARTICLES_DEBUG QV4_MM_AGGRESSIVE_GC
QtQuick Windows QML_USE_GLYPHCACHE_WORKAROUND QV4_MM_MAXBLOCK_SHIFT
--desktop...............................Force use of desktop GL QML_VISUAL_TOUCH_DEBUGGING QV4_MM_MAX_CHUNK_SIZE
--gles.....................................Force use of GLES
Debugging Functions QML_XHR_DUMP QV4_MM_STATS
--software..............................Force use of software rendering QSG_ANTIALIASING_METHOD QV4_NO_INTERPRETER_STACK_SLOT_ALLOCATION
console.assert console.profileEnd
--scaling................................Enable high DPI scaling QSG_ATLAS_HEIGHT QV4_NO_OPT
console.count console.time QSG_ATLAS_NO_BGRA_WORKAROUNDS QV4_NO_REGALLOC
--no-scaling...........................Disable high DPI scaling
--verbose...............................Print version and graphical diagnostics for console.debug console.timeEnd QSG_ATLAS_OVERLAY QV4_NO_SSA
the run-time console.error console.trace QSG_ATLAS_SIZE_LIMIT QV4_PROFILE_WRITE_PERF_MAP
-I path....................................Add path to the list of import paths console.exception console.warn QSG_ATLAS_USE_BGRA_FALLBACK QV4_SHOW_ASM
-B name file...........................Add a named bundle console.info console.error QSG_ATLAS_WIDTH QV4_SHOW_IR
-translation translationfile ....Set the language to run in console.log print QSG_DISTANCEFIELD_ANTIALIASING STATECHANGE_DEBUG

Qt 5.6.0, 16-March-2016 Copyright © 2016 Integrated Computer Solutions, Inc. Page 2 of 2

You might also like