QML Learning Experience

Source: Internet
Author: User

QT Quick is to QML, just as Qt is C++,qml is a new language developed in Qt, and QT Quick is a component library of this language, which contains a lot of components that can be used in QML writing.

QML Hello World

// Import Statements Section 2.4  2.2// Object Declaration part Window {   true    mainform {       Anchors.fill:parent       mousearea.onclicked: {            qt.quit ();    }}}

As this code shows, a QML document defines a Qml object tree, which consists of two parts: an import part, an object declaration part.

Import import statements are similar to # include in C + +, and only the relevant modules are imported to use the types and features in them. The Qtquick module is imported here, which is the set of components we chose earlier when we created the project, which contains the basic types and functions needed to create the user interface, while the window type is available in the Qtquick.window module, which creates a top-level window for the QT quick scene.

in the window Visible is the window's property, which sets whether or not the windows are displayed, and you can view all the properties and usages of a type in the Help document.

QML Learning Experience

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.