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

setClipRect() after setClipRegion() call doesn't change clipping region

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2.5, 6.3.0 RC, 6.4.0 Beta1
    • 6.2.2, 6.2.3
    • GUI: Painting
    • None
    • macOS 12.1 Xocde 13.2.1
      Windows 10 VisualStudio 2019
      Debian Unstable GCC 11.2.0
    • All
    • f46db29d8c (qt/qtbase/dev) f46db29d8c (qt/tqtc-qtbase/dev) 7db9da339c (qt/qtbase/6.3) 7db9da339c (qt/tqtc-qtbase/6.3) 11db653adc (qt/qtbase/6.2) 11db653adc (qt/tqtc-qtbase/6.2) 7db9da339c (qt/tqtc-qtbase/6.3.0)

    Description

      problem was noticed in qBittorrent project, progress bar delegate was painted incorrectly - while it is "empty" font was white with light shadow around (so it is almost unreadable) and with progress bar filling text disappears (looks like overlapped by filled part), and only when progress bar become full text "100%" becomes visible.  see attached screenshots.

      qBittorrent uses Fusion style for progress bar painting, so firstly I looked into it. I was disappointed with no any significant changes compared to Qt 5, so decided to make some experiments. as result I found that replacing setClipRect() call with setClipRegion() fixes the issue https://www.dropbox.com/s/s42x0bthmm4oyo7/qt6-pb-workaround.patch?dl=0 . so, I looked into their implementations and also compared them with Qt 5 and found the difference in just one line https://github.com/qt/qtbase/blame/4db05007d72963c082f3ffdfcc7a68c1fb53c266/src/gui/painting/qpainter.cpp#L2871. this line is appeared with commit https://github.com/qt/qtbase/commit/5e4adb9fdab99749e3e75d8dc706ba6a0366f18d . changes analysis hints that similar change in setClipRect() just was forgotten or lost. reverting the changes in qpainter.cpp also fixes the issue. I don't know what is the correct way to fix this (add new line or revert changes), so opened a ticket.

      patch which adds missing lines to setClipRect() functions is attached

      Attachments

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

        Activity

          People

            vgt Eirik Aavitsland
            nick-korotysh Nick Korotysh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes