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

TabButton has wrong text alignment in statically created itmes

    XMLWordPrintable

Details

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

    Description

      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"
                  }
              }
          }
      

      Attachments

        1. TabButtonStatic.png
          11 kB
          Nikita Krupenko

        Issue Links

          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
              krnekit Nikita Krupenko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes