import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.0 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") ColumnLayout { anchors.fill: parent TabBar { id: spinTabs // Bug Without fillWidth (or some other way of establishing a fixed width) // there the process will hang (seems to be an unreported infinite binding loop involving the implicit width and the layout) // when tabs are removed. Likely the implicit width somehow depends upon the current width? //Layout.fillWidth: true //implicitWidth: 300 // oddly, fixing "width" (instead of "implcitWidth") of the TabBar does not help // in fact, this fixed width is not even honored, the control draws wider than specified //width: 300 Repeater { id: rootParentMenuItemFactory model: spin.value delegate: TabButton { text: "Tab%1".arg(index) // giving the TabButton fixed width also resolves the binding loop/hang //width: implicitWidth } } } SpinBox { id: spin from: 0 to: 20 value: 3 editable: true } Text { text: "Press '-' twice.\nThe first time (3 tabs down to 2) the TabBar will resize very strangely\n the second (2 tabs down to 1) it will hang" } } }