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

Alignment in styleSheet doesn't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.3.1
    • Tools: Designer
    • Windows 10, Qt Creator 8.0.1
    • Windows

    Description

      qproperty-alignment in styleSheet of QLabel with text only doesn't affect actual "alignment" property of QLabel in properties menu in the right part of Qt Creator. Also, it's impossible to manually change alignment by itself in that menu, it's only possible to change the horizontal alignment or vertical alignment apartly choosing items in the lists, but it's impossible to write down a needed alignments in the line "alignment" by yourself.
      This issue occures in QPushButton too, so it is a general problem.

      I have used these styleSheets for my QLabel:

      QLabel

      { qproperty-alignment: 'AlignRight | AlignVCenter'; }

      QLabel

      { Qt::Alignment: 'AlignLeft'; }

      QLabel

      { Qt::HorizontalAlignment: 'AlignLeft'; }

      QLabel{
      qproperty-alignment:

      {int(QtCore.Qt.AlignRight)}

      ;}

      None of them affects this "alignment" property.

      Attachments

        Activity

          People

            Unassigned Unassigned
            maxcury Max Cury
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: