Здравствуйте. Взял готовый пример таб виджета. Хочу создавать табы динамически, допустим на клик. Вот пример main.qml
import QtQuick 1.0
Rectangle{
    function addTab(){
        var newObject = Qt.createQmlObject('import QtQuick 1.0; Rectangle {property string title: "Green"; anchors.fill: parent;color: "#e3e3e3";Rectangle {anchors.fill: parent; anchors.margins: 20;color: "#7fff7f"; Text {width: parent.width - 20;anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter;text: "Flower stems are green";font.pixelSize: 20;wrapMode: Text.WordWrap}}}',tabs);
    }
    Rectangle{
        id:button;
        height: 100;
        width: 100;
        color: "black"
        Text {
            id: text1
            text:"text"
            anchors.fill: parent
        }
        MouseArea{
            anchors.fill: button;
            onClicked: addTab();
        }
    }
 TabWidget {
     id: tabs
     x: 0
     y: 100
     width: 640; height: 380
     Rectangle {
         property string title: "Red"
         anchors.fill: parent
         color: "#e3e3e3"
         Rectangle {
             anchors.fill: parent; anchors.margins: 20
             color: "#ff7f7f"
             Text {
                 width: parent.width - 20
                 anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
                 text: "Roses are red"
                 font.pixelSize: 20
                 wrapMode: Text.WordWrap
             }
         }
     }
 }
}
Таба создается, но как - то не правильно. Складывается ощущение что нужно просто перерисовать весь элемент заново. Подскажите в чем мб проблема. Возможно ли такое получить с этим виджетом. Сам Tab Widget брал от сюда :http://qt-project.org/doc/qt-4.8/declarative-ui-components-tabwidget.html