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

MacOS scaling issue after creating the first QGLWidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.0
    • 5.11.2
    • None
    • macOS Mojave (10.14) on a MacBook with a retina screen
    • macOS

    Description

      When, on my Mac running macOS Mojave (10.14) and Qt 5.11.2, I run an application without a QGLWidget, everything shows normally. However, at the moment the first QGLWidget is displayed, all widgets suddenly become twice as large, effectively limiting the window to displaying only its top left quarter.

      I've minimized this to a test case that shows a QLabel. After a second, it creates a hidden QGLWidget. When starting, the application looks fine; after a second, the label suddenly becomes too large for the window. It looks to be a per-window issue, since the next window looks normal again. This is regardless of whether the AA_EnableHighDpiScaling option is set.

      In the attachments, I've included a tarball containing:

      • main.cpp: reads parameters, sets optional QApplication options, creates MainWindow
      • mainwindow.*: a QMainWindow displaying a label, then creating a QGLWidget after a second
      • Makefile to help building this
      • pre-compiled moc_mainwindow.cpp and binary from my machine, to compare

      On my machine, if I extract the tarball, run make, then ./test, the issue is visible after a second. Others using macOS Mojave have confirmed the bug, while others using macOS High Sierra (10.13) and Qt 5.11.1/5.11.2 have reported the issue does not occur for them, so it is likely introduced by macOS Mojave (10.14). Note that likely, a retina screen (or similar) is necessary to reproduce the bug.

      Screen recording that shows the issue: https://www.dropbox.com/s/15ckpzqyhz13x0n/Screen%20Recording%202018-10-20%20at%2020.07.08.mov?dl=0

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            sjorsg Sjors Gielen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes