Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69676

getTab() function can not do work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.11.1
    • None
    • OS: Window 7
    • Windows

    Description

      First, items inside a Tab can not be accessed from the outside, such an issue has already appeared in this site. Then I try to use the function of getTab() to get the current tab, but I failed.

      The code as follows:

      Window {
          TabView {
              id: view
              Tab {
                  active: true
                  Rectangle {
                      id: rec1
                      width: 200; height: 100;
                      color: "red"
                  }
              }
          }
          Component.onCompleted: {
              console.log(view.currentIndex)
              console.log(view.getTab(view.currentIndex))
          }
      }
      
      

      which I got :

      qml: 0
      
      qml: undefined
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            norlan 思雨 吉
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes