QT5.3 Qt5, the Qwidget series was stripped from the Qtgui and became a separate qtwidget module. With the introduction of Qt Quick2, qtdeclarative also gradually and Qwidget series also divorced from the relationship.

Source: Internet
Author: User

Excerpt from: http://www.cnblogs.com/aoldman/p/3968280.html

QT5, the Qwidget series is stripped out of the Qtgui and becomes a separate qtwidget module. With the introduction of Qt Quick2, qtdeclarative also gradually and Qwidget series also divorced from the relationship.

Final: GUI programming under QT5, there are two sets of different things

Qtwidget (using a thing called Backingstore)

QtQuick (using a thing called Scene Graph)

Qt4 in the Qdeclarativeview and so on a series of things were changed to Qquickview and Qqmlitem and so on respectively into the Qtquick and QTQML module.
Qquickview This set of framework completely out of the shackles of qwidget, all the way from Qsurface to Qwindow inherited, although the window, but not like a window.
Qquickview instinct is to use OpenGL, which uses hardware acceleration.

Qquickview provides a form for displaying the UI
Qqmlengine provides an environment for QML operation
Qquickwindow display forms, as well as management and user interaction with the item object

Qqmlapplicationengine a handy object from Qt5.1 that includes Qqmlengine and qqmlcomponent to create a QML based on a application file.

The Qqmlcontext class provides a context for the instantiation of an object and the evaluation of an expression. All objects are instantiated in a specific context, and the expression to be executed in the application run is executed in a specific context. This context defines how a symbol is parsed and the value of an expression operation.

The Qqmlcomponent class can be used to load QML documents. It requires Qqmlengine to instantiate the hierarchy of objects defined in the QML document

A typical QML application has a C + + function entry point, which is: Instantiate a qqmlengine and load a QML document with Qqmlcomponent. The engine (Qqmlengine object) provides a default Qqmlcontext, which is a top-level context for executing the methods and expressions defined in the QML document. The object hierarchy defined in the QML document will be instantiated by invoking the Create () method of the Qqmlcomponent instantiation object.

The client may need to modify the default Qqmlcontext provided by the engine by injecting properties or objects into the context. They can access the top-level context by calling the Qqmlengine::rootcontext () method.

After instantiating an object, the client typically passes control to the application's event loop so that the user's input time (such as a mouse click) can be distributed and processed by the application.

QML inside row represents a row of data, so item is sorted by column

QML the column represents a list of data, so item is sorted by row

Anchors (anchor point) in row and column does not work

Rowlayout and Columnlayout also represent a row and a column but provide a variety of layout-attached properties and can use the anchors

To get the screen resolution in QML, you can pass multiple properties of the screens object: for example

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.