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

QPushButton style "text-align: bottom" not working in Qt 5.15.1

    XMLWordPrintable

Details

    • Windows
    • 6269438af95bbd988ead08829fa3bc9dc25891e8 (qt/qtbase/dev) 971930ec67e8e2929936307a949d09d38d81a443 (qt/qtbase/5.15) cc785b9b68d1b3b848be67e672dea91ee5715b7b (qt/qtbase/6.0) 41e665a452166259b5cad64994de3298751eb7f3

    Description

      Hello

      I just installed Qt 5.15.1 and compiled my application. I noticed that the position of the text on QPushButton with style sheet "text-align: bottom" is not correct anymore. Switching back to Qt 5.13.0 everything works fine.

      In my style sheet I have the following section for QPushButton

       

      QPushButton

      { color: #36536C; background-color: #CAEDF3;   text-align: left bottom; padding-left: 24px; padding-bottom: 24px; font-size: 18px; }

      The visual result should be a text aligned to the bottom with a distance of 24px, but the real result is a text aligned to the top of the button. Again switching back to Qt 5.13.0 everything works fine again.

       

      To test this bug I created a simple project which set dynamically the style sheet to a QPushButton. As you can see when I set the style as "text-align: bottom;" the text goes in the center of the button.

      The same project using Qt 5.13.0 works perfectly

       

      The project is developed in the following anviroment:

      Qt 5.15.1 or Qt 5.13.0

      Visual Studio 2019

      Compiler Visual Studio v142

      Running OS Windows 10

       

      Regards

      Marco

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-86857
          # Subject Branch Project Status CR V

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              marco.beninca71 Marco Beninca
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: