Important: Please read the Qt Code of Conduct -

New Qt Quick projects are completely black when ran

  • I'm using Qt Creator with Qt 5.9.7 on macOS Mojave, and am having an issue when creating a fresh project. Whenever I create a new project then build/run it, the window appears and is completely black (except for the system title bar) as shown in the screenshot I attached.

    I've also tried adding a blue rectangle - which didn't show up. I then added a mouse area to the rectangle which would output to the console when clicked, and that functionality worked just fine. I also did the same thing with the plain Stack template, but added the mouse area to Page1, and was eventually able to navigate to that page, click the mouse area, and get console output, so I'm left to believe things are actually "working" behind the black screen.

    I've tested Empty, Scroll, Stack, and Swipe projects with the same results. However, when I move the projects over to my other computer (running macOS High Sierra) it works as expected.

    One last thing to add: when I open previous projects that I completed on my old Mac, those work perfectly fine. However, I then created a new project on my old Mac and moved it over and it still turns black (but works on my old Mac).

    Have any of you seen this before?

    Latest Xcode is installed, with latest CLT and such.


    0_1549653500633_Screen Shot 2019-02-08 at 12.51.11 PM.png

  • Lifetime Qt Champion

    Hi and welcome to the forums
    In one of the answers it says
    "The official answer: Qt 5.9 does not support the 10.14 SDK, and will not be updated to do so. Please use Xcode 9 / SDK 10.13."

    So I wondering if its simply because its not supported that QML apps produce this black screen.


    So i wonder if you could try the newest Qt version ?

  • @mrjj

    Thanks for the quick response! I'll read through those links, see if I can find a solution, and report back with my findings. Isn't 5.9 still in LTS, though? I would have thought they'd made the update to keep it supported...

    The strange thing is that the "finished" projects I migrated from my old Mac work just fine.

  • Lifetime Qt Champion

    @MrM0492 said in New Qt Quick projects are completely black when ran:

    The strange thing is that the "finished" projects I migrated from my old Mac work just fine.

    That is indeed strange then. They are also QML?
    As far as i understand it QWidget mostly works.

    Yes please report back.

  • Lifetime Qt Champion


    Are you re-building your "finished" projects or just running them ?

  • @SGaist

    Great question! I am building them on the new machine

    I got everything working smoothly now. I will post my findings soon!

    Thanks for the response!

  • @mrjj

    Everything is running great after installing Xcode9!

    I needed both Xcode9 and Xcode10, so I installed Xcode9.4.1 with the name (and CLT for Xcode 9.4.1, just in case) from Apple's Developer Downloads Portal

    Then, I added the following aliases to ~/.bash_profile to allow me an easy way to switch CLT between the two Xcode versions

    alias clt9="sudo xcode-select -s /Applications/"
    alias clt10="sudo xcode-select -s /Applications/"
    alias cltpath="sudo xcode-select -p"

    Finally, after ensuring the CLT path pointed to Xcode9, I deleted my build folders (required, as a clean and rebuild is not enough), rebuilt my applications, and it worked!

    I've been using Xcode 10 on High Sierra since September, so Xcode 9 solving this issue has me a little confused, but I'm fine with it since it means I'm back up and running! Ha

    Thanks again for the help! I really appreciate it!

Log in to reply