This document is translated from the official QT documentation:http://doc.qt.io/qt-5/qmlapplications.htmlQML Applications
QML is a declarative language that allows the user interface and interaction behavior to be "described". This is a very readable, dynamically interconnected component of the language, and it allows the component can be very easy to reuse and interface customization. Using the Qtquick module, designers and developers can use QML to develop a smooth animation interface or to connect the user interface to the back-end C + + library.
What is QML?
QML is the user interface specification and programming language. It allows developers and designers to develop high-performance, smooth animation, beautiful applications. QML provides highly readable, declarative, syntax-like JSON-enabled JavaScript expressions that are bound to dynamic properties.
The QML language and engine architecture is provided by the Qt QML module. See the Qt QML documentation for more information.
The following pages contain more QML instructions:
- use QML First step --through these instance programs to get to know QML
- Create a QT Quick project in QT Creator
- QML Help document --QML structure and feature description
- QML Coding Conventions
- QML Glossary
What is Qt Quick?
Qt Quick is the QML type and function standard library. It contains virtual types, interaction types, animations, models and views, material effects, and shadow effects. A QML application developer can use all of these features with a simple sentence.
The QT Quick QML Library is provided by the QtQuick module, and theqt quick module documentation contains more descriptions of QML types and other features.
QML User Interface
To create a custom graphical user interface, in addition to the QML standard type, QtQuick added types, animation types, and other qml types from Qt qml. qt Quick Designer is integrated in the QT Creator, which supports QtQuick 2, Qtcreator 2.7.
- Virtual types in the QML
- Responding to user input in QML
- Animations in the QML
- displaying text in QML
- Layout processors in the QML
- Style and theme Support
- Integrating JavaScript in QML
- Scaling
buttons, menus, and other controls
In the basic UI control, the Qt Quick control module implements a number of buttons, menus, and views. These controls mimic the native style of different platforms (Windows,mac,linux).
- Qt Quick Controls Overview
- Style
- dialog box
- Layout
- Other
Special Effects
Some QT modules provide the types of create effects, for more information see:
- Material effect
- graphic Effects --Create image effects
Browse Web content in the QML app
QML types: Webengineview and WebView, which can render and display Dynamic Web page content. The only difference between the two is that, if allowed, the WebView will use the native Web page as a visual effect. Both of these types can load URLs and HTML string information. For more sample programs and information, see qt webengine and qt WebView.
sensor, pack and touch screen interface
The Qt Sensors module allows the program to read information from sensors such as accelerators and tilt gauges. These QML APIs are available for different platforms and can be expanded using C + +.
- Qt Sensors QML Type
- QT Sensor Sample Program
- General Maps -lists the levels supported by different mobile platforms.
Multimedia Content
The QT multimedia module enables programs to handle a variety of multimedia content by using a convenient collection of QML types. These QML types can also be expanded using C + +.
- Multimedia
- Voice
- Video screen
- Camera
- Broadcasting
- Qt Audio Engine --3d surround sound and content management
Mobile Devices
Some QT modules provide QML API support for networking and mobile devices. The QML type provides support for Bluetooth, short-distance communication (NFC), and GPS devices.
- Qt positioning
- Qt Orientation
- Qt bluetooth
- Qt Short Distance communication
See also: Network and Connectivity , Mobile API pages.
code samples and program examples
More QML code that shows how to use the QML type, and there are many program examples that show how to use QML code in your application.
- start with QT Quick -A simple QML editor tutorial
- Qt Quick Examples and tutorials
Advanced Application Development Section
- Publish QML Program
- Reflection and suggestion of performance
- Localization and regional
- Testing and Commissioning:
- Qmlscene prototype
- Debug QML Program
- Qt Quick test: QML Unit Test framework
some other QML modules
QT Quick provides only a few basic virtual types, and many of the functions of QT are exposed to QML through other modules. If you want to use these features, you need to refer to their QML documentation.
All QML module APIs contain a list of modules qml in QT5.
Related Topics
Porting the QML application to the QT5
QT 5.7 > QT applications