diff --git a/lib_source/qml/RibbonTabBar.qml b/lib_source/qml/RibbonTabBar.qml index f77ca44..4168cb5 100644 --- a/lib_source/qml/RibbonTabBar.qml +++ b/lib_source/qml/RibbonTabBar.qml @@ -90,7 +90,6 @@ Item{ left: parent.left right:tool_bar.left } - background: Item{} position: TabBar.Header currentIndex: stack.currentIndex @@ -299,4 +298,20 @@ Item{ timer.start() } } + + function setPage(index) + { + for (let i=0, count = 0; i < bar.contentChildren.length; i++) + { + let item = bar.itemAt(i) + if(item instanceof RibbonTabButton){ + if (count === index) + { + item.checked = true + break + } + count++ + } + } + } }