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

[Reg 5.15.12 -> 6.4.2] QProxyStyle returns a rect with negative width

    XMLWordPrintable

Details

    Description

      In the example a QTabBar is used in a special way: The last tab is "fixed", e.g. it should always be visible, even when the scroll buttons are shown. To do this, a corner widget is used and implemented a widget that can draw a single tab with a QStylePainter (CornerTab.h).

      In Qt 5.15.12 this works fine, but with Qt6 only the panel is drawn and not the text.
      The debug output of the proxy style shows that the text is tried to draw with a rect with a negative width. The rect for the tab panel is correct, but the rect for the tab text is calculated with negative witdth in Qt6.

      To reproduce the issue, please run the attached example. With Qt6, the text is not drawn to to rightmost tab and the debug output shows the negative value for the rect width.

      Attachments

        1. qtbug_111573.zip
          6 kB
        2. qtbug111573_5_diag.diff
          5 kB
        3. qtbug111573_5_log.txt
          55 kB
        4.  qtbug111573_515.jpg
          qtbug111573_515.jpg
          20 kB
        5. qtbug111573_6_log.txt
          73 kB
        6. qtbug111573_diag.diff
          5 kB
        7.  qtbug111573.jpg
          qtbug111573.jpg
          19 kB
        8. qtbug111573.zip
          4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            axelspoerl Axel Spoerl
            tuomas.vaarala Tuomas Vaarala
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes