Qt QML
2016-04-24 10:53
399 查看
Contents
Getting Started
QML and QML Types
Lists and Models
JavaScript Environment for QML Applications
Integrating QML with C++ Applications
Additional Frameworks
Guides and Other Information
Reference
Qt QML
The Qt QML module provides a framework for developing applications and libraries with the QML language. It defines and implements the language and engine infrastructure 基础设施, and provides an API to enable application developers to extend the QML language with custom types and integrate QML code with JavaScript and C++ 集成QML和C++. The Qt QML module provides both a QML API and a C++ API.
Note that while the Qt QML module provides the language and infrastructure for QML applications, the Qt Quick module provides many visual components 可视化组件, model-view support, an animation framework 动画框架, and much more for building user interfaces.
For those new to QML and Qt Quick, please see QML Applications for an introduction to writing QML applications.
Getting Started
To include the definitions of the module’s classes, use the following directive:
#include
The QML types in Qt QML are available through the QtQML import. To use the types, add the following import statement to your .qml file:
import QtQml 2.0
To link against the module, add this line to your qmake .pro file:
QT += qml
QML and QML Types
The Qt QML module contains the QML framework and important QML types used in applications. The constructs of QML are described in the The QML Reference.
In addition to the QML Basic Types, the module comes with the following QML object types:
Component
QtObject
Binding
Connections
Timer
The Qt global object provides useful enums and functions for various QML types.
Lists and Models
New in Qt 5.1, the model types are moved to a submodule, QtQml.Models. The Qt QML Models page has more information.
DelegateModel
DelegateModelGroup
ListElement
ListModel
ObjectModel
JavaScript Environment for QML Applications
JavaScript expressions allow QML code to contain application logic. Qt QML provides the framework for running JavaScript expressions in QML and from C++.
These sections are from The QML Reference.
Integrating QML and JavaScript
Using JavaScript Expressions with QML
Dynamic QML Object Creation from JavaScript
Defining JavaScript Resources In QML
Importing JavaScript Resources In QML
JavaScript Host Environment
Integrating QML with C++ Applications
The module also provides the framework for running QML applications. The QML framework allows QML code to contain JavaScript expressions and for the QML code to interact with C++ code.
Important C++ Classes Provided By The Qt QML Module
Integrating QML and C++
Additional Frameworks
The Declarative State Machine Framework
Guides and Other Information
Further information for writing QML applications:
The QML Reference
QML Applications - essential information for application development with QML and Qt Quick
Qt Quick - a module which provides a set of QML types and C++ classes for building user interfaces and applications with QML
Reference
C++ Classes
QML Types
Examples
Getting Started
QML and QML Types
Lists and Models
JavaScript Environment for QML Applications
Integrating QML with C++ Applications
Additional Frameworks
Guides and Other Information
Reference
Qt QML
The Qt QML module provides a framework for developing applications and libraries with the QML language. It defines and implements the language and engine infrastructure 基础设施, and provides an API to enable application developers to extend the QML language with custom types and integrate QML code with JavaScript and C++ 集成QML和C++. The Qt QML module provides both a QML API and a C++ API.
Note that while the Qt QML module provides the language and infrastructure for QML applications, the Qt Quick module provides many visual components 可视化组件, model-view support, an animation framework 动画框架, and much more for building user interfaces.
For those new to QML and Qt Quick, please see QML Applications for an introduction to writing QML applications.
Getting Started
To include the definitions of the module’s classes, use the following directive:
#include
The QML types in Qt QML are available through the QtQML import. To use the types, add the following import statement to your .qml file:
import QtQml 2.0
To link against the module, add this line to your qmake .pro file:
QT += qml
QML and QML Types
The Qt QML module contains the QML framework and important QML types used in applications. The constructs of QML are described in the The QML Reference.
In addition to the QML Basic Types, the module comes with the following QML object types:
Component
QtObject
Binding
Connections
Timer
The Qt global object provides useful enums and functions for various QML types.
Lists and Models
New in Qt 5.1, the model types are moved to a submodule, QtQml.Models. The Qt QML Models page has more information.
DelegateModel
DelegateModelGroup
ListElement
ListModel
ObjectModel
JavaScript Environment for QML Applications
JavaScript expressions allow QML code to contain application logic. Qt QML provides the framework for running JavaScript expressions in QML and from C++.
These sections are from The QML Reference.
Integrating QML and JavaScript
Using JavaScript Expressions with QML
Dynamic QML Object Creation from JavaScript
Defining JavaScript Resources In QML
Importing JavaScript Resources In QML
JavaScript Host Environment
Integrating QML with C++ Applications
The module also provides the framework for running QML applications. The QML framework allows QML code to contain JavaScript expressions and for the QML code to interact with C++ code.
Important C++ Classes Provided By The Qt QML Module
Integrating QML and C++
Additional Frameworks
The Declarative State Machine Framework
Guides and Other Information
Further information for writing QML applications:
The QML Reference
QML Applications - essential information for application development with QML and Qt Quick
Qt Quick - a module which provides a set of QML types and C++ classes for building user interfaces and applications with QML
Reference
C++ Classes
QML Types
Examples
相关文章推荐
- qt类型转换
- Qt Creator Plug-in Gallery
- Qt基础(一)----按钮,文本框,窗口,布局,选项框等等
- qt中的OpenGL代码框架
- QT网络编程笔记
- qt中打开摄像头
- Qt之图形(绘制文本)
- Qt之图形(绘制文本)
- 浅谈QTableView和QTableWidget数据表格显示方式
- win10+qt5.6.0+qtcreator3.6.1+mingw4.9.2+opencv4.8.12环境安装
- Qt开发环境搭建
- qthread 使用 signal 方法通信
- Qt实现基于G.729A(G729A)的语音聊天
- 解决Ubuntu中QtCreator(3.6.1)不能使用搜狗输入法录入汉字问题
- qt翻译--QTextTableCell(表格单元)
- Qt 打开安卓相册选择图片并获取图片的本地路径
- QT Layout 布局的重要性
- 根据 Mavlink 协议串口通信实现数据的实时更新并用折线图显示
- [QT学习]拷贝文件
- win7_64bits下QT试用openCV库(1)