QGridLayout or QFormLayout like Grid in QML
I'm using QML Desktop Components 0.1 with QtQuick 1.1.
I'm wondering how to make in QML layout of items that behaves the same as QGridLayout or QFormLayout.
There is Grid, but items within it don't scale to fill the grid.
I need to make form like layout so there are labels and text fields. Text fields should resize to fill parent (window resize).
There anchors, but for eg, i have 20 text areas with labels and I don't want to set anchor for every single item ... It's not efficient.
How to do that properly with QML?
Re: QGridLayout or QFormLayout like Grid in QML
Grid should work fine. Just make sure you anchor it properly.
Re: QGridLayout or QFormLayout like Grid in QML
Unfortunately not: https://qt-project.org/doc/qt-4.8/qm...ml#limitations
When I'm using anchors warnings are printed in console and not always everything works as it should ...
Re: QGridLayout or QFormLayout like Grid in QML
You can always do something like this:
Code:
Rectangle {
width: 360
height: 360
Column {
id: c1
width: 0.5*parent.width
anchors.left: parent.left
Rectangle { color: "red"; height: 200; width: parent.width}
}
Column {
id: c2
anchors.left: c1.right
anchors.right: parent.right
Rectangle { color: "blue"; height: 200; width: parent.width }
}
}