TabView switching position



  • Hi,

    I am doing a form with QML Controls 2. In this form, there are 3 tabs. I did these tabs with TabView, TabButton and StackLayout.
    It works well except for one thing: when I click on the tabs, the tab order changes and I want them to remain fixed.
    For instance the tabs are a,b,c. If I click on b, they become b,c,a. I didn't find any option for the tabs to remain fixed.

    Thank you very much,

    Alex

       TabBar
        {
            id: bar
            width: (configwindow.width)
            TabButton
            {
                text: qsTr("a")
                width: (configwindow.width)*0.3
            }
            TabButton
            {
                text: qsTr("b")
                width: (configwindow.width)*0.3
            }
            TabButton
            {
                text: qsTr("c")
                width: (configwindow.width)*0.3
            }
         }
    
    
        StackLayout
        {
            width: parent.width
            currentIndex: bar.currentIndex
            Item
            {
                id: homeTab
            }
            Item
            {
                id: discoverTab
            }
            Item
            {
                id: activityTab
            }
        }
    

  • Moderators

    @alecs26
    what version of Qt are you using exactly? 5.7.0, 5.7.1 or 5.8 RC?
    If thats really all the code you are using, it sounds like a bug to me.



  • This was with 5_7_1_MinGW
    I just guessed it was the normal behavior...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.