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

[REG] Broken Qt::TextAlignmentRole

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.3, 6.4
    • Fix Version/s: 6.4.0 Beta1
    • Component/s: Widgets: Itemviews
    • Labels:
      None
    • Platform/s:
      Linux/X11
    • Commits:
      54d81d1189 (qt/qtbase/dev) 54d81d1189 (qt/tqtc-qtbase/dev) 7bd76c5620 (qt/qtbase/6.3) 7bd76c5620 (qt/tqtc-qtbase/6.3)

      Description

      Column alignment is broken as of https://code.qt.io/cgit/qt/qtbase.git/commit/?id=6880b7c39b2c7474be1c9adcabbe0b7d6596822f when using multiple alignment flags in a 
      QAbstractListModel.
      Returning a single flag Qt::AlignLeft from Qt::TextAlignmentRole works but 
      ie.: QVariant(Qt::AlignLeft | Qt::AlignVCenter) does not work anymore.
      The reason is that the metatype is uint not int like legacyFlagValueFromModelData expects now.
      So to make it work you would have to cast to int like: QVariant(static_cast<int>(Qt::AlignLeft | Qt::AlignVCenter))
      I will open a codereview with a fix.
       

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            jonaski Jonas Kvinge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes