Thanks anda_skoa for the suggestions
However, I noticed that it returns 0 when the tabview is loaded or when he switches the tab the first time.
It works fine when switching tabs the second time
To fix that I tried using Component.onCompleted, but noticed that the count of tabs is 0 when the component is created
Here's the code to fix those problems
onCountChanged:{
if(count == 1){
tabview.height = Qt.binding(function() {
return getTab(currentIndex).childrenRect.height
})
}
}
onCountChanged:{
if(count == 1){
tabview.height = Qt.binding(function() {
return getTab(currentIndex).childrenRect.height
})
}
}
To copy to clipboard, switch view to plain text mode
Is the code mentioned here the right way to do so or is there a more effective way to do so?
Kindly advice
Bookmarks