Я работаю над быстрым контролем qt, и у меня возникла проблема с TableViewColumn в QtQuick.Controls 1.4.Я хочу создать TabView с 2 вкладками, как показано ниже: изображение 
Во-первых, я создал TabBar с этим кодом
TabBar {
id: tabBarScriptLinker
anchors.top: tbvDevices.bottom
anchors.topMargin: 10
anchors.left: tbvDevices.left
anchors.right: tbvDevices.right
position: TabBar.Header
TabButton{
height: parent.height
background: Rectangle{
color: tabBarScriptLinker.currentIndex == 0 ? qsTr("#5661f7") : qsTr("#ddd9f9")
}
contentItem: Text{
text: "Scence"
font.pixelSize: 12
font.bold: true
color: tabBarScriptLinker.currentIndex == 0 ? qsTr("white") : qsTr("black")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
TabButton{
height: parent.height
background: Rectangle{
color: tabBarScriptLinker.currentIndex == 1 ? qsTr("#5661f7") : qsTr("#ddd9f9")
}
contentItem: Text{
text: "Linker"
font.pixelSize: 12
font.bold: true
color: tabBarScriptLinker.currentIndex == 1 ? qsTr("white") : qsTr("black")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
}
После этого я продолжилСоздание StackLayout и табличного представления будет следовать ниже TabBar
StackLayout{
anchors.top: tabBarScriptLinker.bottom
anchors.left: tabBarScriptLinker.left
anchors.right: tabBarScriptLinker.right
anchors.bottom: rLayoutScLiControl.top
anchors.bottomMargin: 10
currentIndex: tabBarScriptLinker.currentIndex
Item {
id: sceneTab
Layout.fillWidth: parent.width
Layout.fillHeight: parent.height
QtC1.TableView{
id: tbvScences
anchors.fill: parent
ListModel{
id: lstScences
ListElement{
num: 1
name: qsTr("on all")
}
ListElement{
num: 1
name: qsTr("off all")
}
}
/* Create columns */
QtC1.TableViewColumn{
id: tbvScences_num
horizontalAlignment: Text.AlignHCenter
role: qsTr("num")
title: qsTr("Num")
width: 40
}
QtC1.TableViewColumn{
id: tbvScences_Name
horizontalAlignment: Text.AlignHCenter
role: qsTr("name")
title: qsTr("Name")
width: 60
}
model: lstScences
}
}
Item {
id: linkerTab
Layout.fillWidth: parent.width
Layout.fillHeight: parent.height
QtC1.TableView{
id: tbvLinkers
anchors.fill: parent
ListModel{
id: lstLinkers
ListElement{
label: qsTr("Tang 4518")
MAC: qsTr("65-46-AF-4C-6B-91")
}
ListElement{
label: qsTr("Tang 56")
MAC: qsTr("25-02-AF-C8-6B-21")
}
}
/* Create columns */
QtC1.TableViewColumn{
id: tbvLinkers_Label
horizontalAlignment: Text.AlignLeft
role: qsTr("label")
title: qsTr("Label")
width: 100
}
QtC1.TableViewColumn{
id: tbvLinkers_MAC
horizontalAlignment: Text.AlignLeft
role: qsTr("MAC")
title: qsTr("MAC")
width: 120
}
model: lstLinkers
}
}
}
Это работало отлично, как я и ожидал, но появился какой-то странный журнал
"Размер модели -2 меньше 0"на вкладке приложения. Когда я нажимаю на вкладку «Линкер», на вкладке «приложение» немного меняется на «Размер модели -3 меньше 0». Я думаю, что у моего приложения есть проблема, может кто-нибудь дать мнепричина?Стоит ли рассматривать этот вопрос?
Спасибо за помощь!