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

QMacStyle on Yosemite: QStyle::drawPrimitive(QStyle::PE_IndicatorCheckBox, ...) draws in wrong place when not active

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.4.0
    • GUI: Look'n'Feel
    • None
    • Qt 5.4.0, OS X 10.10.1
    • macOS

      Using QStyle::drawPrimitive with QMacStyle on Yosemite (OS X 10.10.1) with QStyle::PE_IndicatorCheckBox the checkbox is drawn at the origin instead of at the place requested by option.rect when option.state lacks QStyle::State_Active.

      The attached project shows the problem. It draws three checkboxes and three rectangles to show where they should be drawn. One has State_Active turned on, and it draws in the correct place. The other two do not have State_Active turned on. One is drawn at the origin, not in the rectangle requested. The third uses a trick to work around the problem: it draws at the origin into a painter that has been translated to compensate. That one draws in the correct place.

        1. CheckboxBug.zip
          4 kB
          John Weeks
        2. ActiveCheckboxes.png
          32 kB
          John Weeks
        3. InactiveCheckboxes.png
          25 kB
          John Weeks
        4. BadQCheckboxes.png
          22 kB
          John Weeks
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            bachewii Jens
            johnweeks John Weeks
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes