Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.1.0 Beta 1
-
None
-
qtquickcontrols/stable: a6deb27ba0252bc06fd6f28fb76b552e6320853f
Description
If you dynamically add a tab to a tabview too early in initialization, it creates an extra tab with the same name, but no contents.
The example below should have a single tab named 'A Tab' with a blue rectangle filling it. Instead it results in two tabs named 'A Tab', with the first being empty, and the second having the blue rectangle in it.
import QtQuick 2.1 import QtQuick.Controls 1.0 Item { id: root TabView { id: tabview anchors.fill: parent } Component { id: dynamic Rectangle { color: 'blue' } } Component.onCompleted: { tabview.addTab('A Tab', dynamic); } }