Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. New Qt Quick projects are completely black when ran

New Qt Quick projects are completely black when ran

Scheduled Pinned Locked Moved Solved QML and Qt Quick
7 Posts 3 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MrM0492
    wrote on last edited by
    #1

    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.

    Thanks!

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

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi and welcome to the forums
      https://blog.qt.io/blog/2018/11/08/qt-macos-10-14-mojave/
      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.

      Also
      https://bugreports.qt.io/browse/QTBUG-68891

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

      M 1 Reply Last reply
      3
      • mrjjM mrjj

        Hi and welcome to the forums
        https://blog.qt.io/blog/2018/11/08/qt-macos-10-14-mojave/
        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.

        Also
        https://bugreports.qt.io/browse/QTBUG-68891

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

        M Offline
        M Offline
        MrM0492
        wrote on last edited by
        #3

        @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.

        mrjjM 1 Reply Last reply
        0
        • M MrM0492

          @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.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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.

          M 1 Reply Last reply
          1
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

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

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            M 1 Reply Last reply
            1
            • SGaistS SGaist

              Hi,

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

              M Offline
              M Offline
              MrM0492
              wrote on last edited by
              #6

              @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!

              1 Reply Last reply
              0
              • mrjjM mrjj

                @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.

                M Offline
                M Offline
                MrM0492
                wrote on last edited by MrM0492
                #7

                @mrjj

                Everything is running great after installing Xcode9!

                I needed both Xcode9 and Xcode10, so I installed Xcode9.4.1 with the name Xcode9.app (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/Xcode9.app/Contents/Developer"
                alias clt10="sudo xcode-select -s /Applications/Xcode.app/Contents/Developer"
                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!

                1 Reply Last reply
                1

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved