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

QQuickIconLabel reports an incorrect baselineOffset

    XMLWordPrintable

Details

    • bbd6c9972206eccc4d2872be44db509ef716c351 (qt/qtquickcontrols2/5.12)

    Description

      IconLabel's baselineOffset is not aligned with the baseline of its text, this poses problems when using it in a layout with Layout.alignment: Qt.AlignBaseline

      IconLabel is the default contentItem for Button.
      A workaround is to use a custom contentItem.

      See attached picture and code for reproduction.

      Attachments

        1. ButtonBaselineBug.png
          ButtonBaselineBug.png
          42 kB
        2. main.qml
          3 kB

        Issue Links

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

          Activity

            People

              mitch_curtis Mitch Curtis
              grecko Pierre-Yves Siret
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes