Você tentou definir uma barra de ferramentas no mainview e simplesmente usar esse id toda vez?
Assim:
import QtQuick 2.0
import Ubuntu.Components 0.1
MainView {
// objectName for functional testing purposes (autopilot-qt5)
objectName: "mainView"
applicationName: "toolbartest"
id: root
// S4 resolution 1920x1080
width: units.gu(54)
height: units.gu(96)
ToolbarActions{
id: centralBar
Action {
text: "print"
onTriggered: print("action triggered")
}
Action {
text: "next"
onTriggered: {
if (tabs.selectedTabIndex < 2){
tabs.selectedTabIndex += 1
} else {
tabs.selectedTabIndex = 0
}
}
}
}
Tabs {
id: tabs
Tab {
title: i18n.tr("Tab1")
page: Page {
Label {
id: label1
anchors.centerIn: parent
text: "A centered label"
}
tools: centralBar
}
}
Tab {
title: i18n.tr("Tab2")
page: Page {
Label {
id: label2
anchors.centerIn: parent
text: "A centered label2"
}
tools: centralBar
}
}
Tab {
title: i18n.tr("Tab3")
page: Page {
Label {
id: label3
anchors.centerIn: parent
text: "A centered label3"
}
tools: centralBar
}
}
}
}