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

CLONE - QDial's knob not centered around background circle

    XMLWordPrintable

Details

    • Linux/X11
    • 0ca3f1732ae9aa8e138142890a35c0b183c55ffd (qt/qtbase/dev)

    Description

      This is a follow-up to QTBUG-8161.

      I am trying to use QStyle::drawComplexControl to draw a range of dials into a table view using a custom QStyledItemDelegate.

      I noticed a similar behaviour as described in the original bug and I think it's related to the painting routine in QStyleHelper::drawDial(). There a subroutine calcRadialPos() is used to compute some origins and I suspect both routines are not entirely consistent in their use of the drawing coordinate system. When drawing i.e., a couple of dials next to each other (offsetting the option.rect.x) all the handles are drawn at the same position, which is somewhere near the handle of the leftmost dial.

      The coordinates returned by calcRadialPos() should at least somehow be offset by the option.rect's origin.

      Attachments

        1. main.cpp
          0.5 kB
        2. qtbug_89574.png
          qtbug_89574.png
          12 kB
        3. qtbug89574.zip
          1 kB
        4. Screenshot_20201221_181236.png
          Screenshot_20201221_181236.png
          29 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chehrlic Christian Ehrlicher
            kamajii Sven Pauli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes