Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.1
-
None
-
-
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.