Although the anchors and positioners already provided Qt Quick with great flexibility, using them with resizable user interfaces became difficult and tedious.anchors based methods, you can create complex resizable layouts by observing the minimum and maximum size hints and declare expanding or fixed elements in a simple way.
buttons , combo box , spin box , group box , sliders , progress bars , text fields and menus .
In addition to the main controls, a new set of views has been added. The image on the left shows SplitView , which allows you to add a vertical or horizontal label for resizing view elements.Flickable element by adding support for scroll bars and frames. ScrollView can be used both separately and in combination with Flickable , for example, to add scroll bars to the ListView .
ListView provided more flexibility at one time, but it was still problematic to create a classic table view. To change this situation, a TableView (shown on the left) was added, providing support for custom styles, as well as resizing columns and rows.

ColorDialog and FileDialog will be supported, but in later releases it is planned to add more dialog boxes.Window declaration in another window implicitly assigns a parent to it (the window in which it was declared). In practice, this means that modal dialogs will behave as they should be, and child windows will be properly centered in their parents by default. In addition, a close signal was added so that the window close request could be processed correctly.
TextEdit you were limited to simple output of formatted text. Most complex Qt applications require access to a text document to provide advanced functions, such as syntax highlighting or printing support. Since using this functionality will require the plugin C ++ plugin, it has become available both from TextEdit and from the new TextArea . Thus, you can include these functions in your Qt Quick applications. As you can see in the screenshot on the left, the good old TextEdit example was ported to Qt Quick using this functionality.QQuickView in C ++ and setting the url on it. The disadvantage of this approach is that you must use C ++ to set properties such as width, height, etc. Qt 5.1 suggests using Window or ApplicationWindow as the root of your application, giving full control to Qt Quick. To make this use case a little easier, QQmlApplicationEngine was added - all you have to do is configure your Qt Quick window, select the desired translation file, and then implicitly the quit() application signal will be connected to your root window. #include <QGuiApplication> #include <QQmlApplicationEngine> int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine("main.qml"); return app.exec(); } Source: https://habr.com/ru/post/184406/
All Articles