morchuboo
February 26th, 2013, 12:15 AM
I have the following snippet from my qml app. Can anyone explain why the second tab does not show. There is no error reported.
Tabs {
id: tabs
anchors.fill: parent
Component.onCompleted: {
mainView.initializeDB();
var feedTab = Qt.createQmlObject('import QtQuick 2.0;import Ubuntu.Components 0.1;Tab {anchors.fill: parent;objectName: "Tab";title: i18n.tr("Tab");page: Page {anchors.margins: units.gu(2);Column {anchors.centerIn: parent;Label {id: label;objectName: "label";text: i18n.tr("Tab");}}}}',tabs,"feedTab");
}
Tab {
id: tabFrontPage
objectName: "tabFrontPage"
title: i18n.tr("Front Page")
// Tab content begins here
page: Page {
Column {
anchors.centerIn: parent
Label {
id: labelFrontPage
text: i18n.tr("This will be the front page \n An aggregation of the top stories from each feed")
}
}
}
}
}
Tabs {
id: tabs
anchors.fill: parent
Component.onCompleted: {
mainView.initializeDB();
var feedTab = Qt.createQmlObject('import QtQuick 2.0;import Ubuntu.Components 0.1;Tab {anchors.fill: parent;objectName: "Tab";title: i18n.tr("Tab");page: Page {anchors.margins: units.gu(2);Column {anchors.centerIn: parent;Label {id: label;objectName: "label";text: i18n.tr("Tab");}}}}',tabs,"feedTab");
}
Tab {
id: tabFrontPage
objectName: "tabFrontPage"
title: i18n.tr("Front Page")
// Tab content begins here
page: Page {
Column {
anchors.centerIn: parent
Label {
id: labelFrontPage
text: i18n.tr("This will be the front page \n An aggregation of the top stories from each feed")
}
}
}
}
}