Today's Project was all about Layout in Qml wen I had a clear overview of ColumnLayout Component
, and how to align components inside it and I had a clear explanation of the Anchors property in QML
and how it Specify the UI Layout or the UI Arrangement of Components
import QtQuick.LayoutsApplicationWindow{id: appWindowvisible: true....ColumnLayout{id: mainLayoutanchors{fill: parentmargins: appWindow.margin //parent.margin}spacing: 10.... // Other Components here}}
-And we also see how to make a Menu Component in QML and how ApplicationWindow has the menuBar Component
import QtQuick 2.15ApplicationWindow {id: appWindowtitle: "Basic Layout"visible: truewidth: 500height: 500menuBar: MenuBar {Menu {title: "File"MenuItem {text: "Save"}MenuItem {text: "Exit"onClicked: Qt.quit()}}}
0 Comments
Post a Comment