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

TabButton has wrong text alignment in statically created itmes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.6.0 Alpha
    • Quick: Controls 2
    • None

      Items created by Repeater has text aligned properly (horizontal center), statically created items has text on the right side.

      import QtQuick 2.5
      import QtQuick.Layouts 1.1
      import Qt.labs.controls 1.0
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 300
      
          ListModel {
              id: tabModel
      
              ListElement {
                  text: "Test 0"
              }
              ListElement {
                  text: "Test 1"
              }
          }
      
          Column {
              width: parent.width
      
              TabBar {
                  width: parent.width
      
                  Repeater {
                      model: tabModel
                      delegate: TabButton {
                          text: model.text
                      }
                  }
              }
      
              TabBar {
                  width: parent.width
      
                  TabButton {
                      text: "Test 0"
                  }
                  TabButton {
                      text: "Test 1"
                  }
              }
          }
      

        1. TabButtonStatic.png
          11 kB
          Nikita Krupenko
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            krnekit Nikita Krupenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes