[Interest] QML | Column | Buttons

René Hansen renehh at gmail.com
Tue Feb 27 11:17:31 CET 2018


You are probably looking to use a *ColumnLayout* and not a *Column*, if you
want to use *Layout.fillWidth*.

/René

On Tue, 27 Feb 2018 at 10:43 Igor Mironchik <igor.mironchik at gmail.com>
wrote:

> Hello,
>
> How can I shrink all buttons to the widest width in QML Column?
>
> I.e. I have:
>
> Column {
>          anchors.centerIn: parent
>          spacing: 20
>
>          Button {
>              id: btn1
>              implicitHeight: appWindow.minimumCtrlHeight
>              Layout.fillWidth: true
>              text: qsTr( "Press" )
>          }
>
>          Button {
>              id: btn2
>              implicitHeight: appWindow.minimumCtrlHeight
>              Layout.fillWidth: true
>              text: qsTr( "Press Press" )
>          }
>
>          Button {
>              id: btn3
>              implicitHeight: appWindow.minimumCtrlHeight
>              Layout.fillWidth: true
>              text: qsTr( "Press Press Press" )
>          }
>
> }
>
> On desktop these buttons are with the same width, but on Android they
> are as small as possible.
>
> Thank you.
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180227/32ca5648/attachment.html>


More information about the Interest mailing list