Qt World Summit: Register Today!

[OSX] Window is blank until forced repaint

  • I'm trying to get up and running with QtQuick and CMake on OSX Mojave (10.14). I'm hitting an issue where when I run my app, the window is displayed but it is completely blank. After doing something to force a repaint (e.g. resizing the window), the content is shown correctly. I've put together a minimal project using CMake to demonstrate the issue, which can be found here. Does anyone have any ideas on what the problem could be? I'm thinking its some configuration setting I'm missing in CMake because when I run the QtQuick example projects, they work fine. But I can't seem to track it down.

  • Do you use Qt 5.12? I just created a QTBUG that looks very similar to your issue:


    You may want to set "QSG_RENDER_LOOP=windows" as a workaround. (Worked for me at least.)

  • It does look like a similar issue. I was able to find a workaround thanks to this bug report. Setting the target OSX version to 10.12 in CMake did the trick.