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

Vertical QPainter::drawLine() result on QWidget is skewed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2.3, 6.3.0 Alpha
    • 6.2.1
    • GUI: Painting
    • None
    • macOS Monterey 12.0.1, Apple clang version 13.0.0 (clang-1300.0.29.3)
    • macOS
    • 4f69a1e1d2ae8f475bbd7e1d3c1ca92487c6ea90 (qt/qtbase/dev) 9ed75c72bf08ab04c7e5a67dae3d026f2e178d18 (qt/qtbase/6.2) c07e85b15d298bdccbfef551448eba966f7bf306 (qt/qtbase/6.2.2)

    Description

      When using QPainter::drawLine() on a QWidget, a vertical line appears to be skewed. This issue does not occur on either Windows or Linux.

      I have attached a small test case, along with two images: the skewed result on macOS, and the expected result which occurs on Linux and Windows using this test case.

      Whether or not the QWidget is a part of the QDockWidget in the test case or not seems to have no bearing on this phenomenon.

      UPDATE: I can confirm there is a regression between Qt 6.2.1 and Qt 5.15.2 on macOS. The latter gives the expected result, the former does not.

      Attachments

        1. linux_win_result.png
          linux_win_result.png
          48 kB
        2. macos_result.png
          macos_result.png
          334 kB
        3. main.cpp
          1 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-98388
          # Subject Branch Project Status CR V

          Activity

            People

              vgt Eirik Aavitsland
              kaichiuchu Michael Rodriguez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes