I am trying to modify Gallery example. I want to add Button
under TabView
. So, I put TabView
and Button
into ColumnLayout
, here is code:
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import QtQuick.Window 2.0
Window {
visible: true
title: "settings"
width: 600
height: 400
ColumnLayout{
anchors.fill: parent
TabView {
anchors.right: parent.right
anchors.left: parent.left
Tab {
title: "Controls"
Controls { }
}
Tab {
title: "Itemviews"
Controls { }
}
Tab {
title: "Styles"
Controls { }
}
Tab {
title: "Layouts"
Controls { }
}
}
RowLayout{
anchors.right: parent.right
anchors.left: parent.left
Button{
text: "ok"
}
}
}
}
However, when I resize window okButton
stands under tab controls. How should I fix code?
Controls
but may be you should useLayout.fillHeight
&Layout.fillWidth
forTabView
? But dont't forget to set height of RowLayout – folibisControls.qml
is inQt Quick Controls - Gallery
example. Just open Qt creator -> welcome and type "Gallery". When I resize windowokButton
stands not underTabView
but aboveTabView
– lnk