How to fix: "line: 1; Qt Quick emulation layer crashed

Viewed 2775

The Problem

I cannot stress this enough but I have looked as far as I can over the internet for a solution and either they didn't have a solution or all they did was add a support ticket. The problem is that after creating a python qt quick application I try opening the QML file but when I go to the design tab it give me this error:

enter image description here

Code

enter image description here

4 Answers

The Designer is very finicky and can crash for various reasons. I've had success seeing the actual errors causing this dialog by launching Creator from the command line with debugging enabled:

QT_LOGGING_RULES="qtc.nodeinstances.init.debug=true" "/Applications/QtCommercial/Qt Creator.app/Contents/MacOS/Qt Creator"

That's specific to macOS but the like approach should work on any OS.

Look for error messages related to "Puppet". That's the name of the subprocess that actually renders the QML for Designer.

You can also go to Preferences -> Qt Quick -> QML Emulation Layer and try the opposite of the current setting and see if it works any better.

The solution that works for me is as follows:

OS: windows 10

Go to Tools >> Options >> Qt Quick >> (tab) Qt Designer enter image description here

In the "Use fallback QML emulation layer", you see the placeholder path there. Switch it to C:\Qt\Tools\QtDesignStudio\bin or use browse if you have a different install location for Qt such that path\to\QtDesignStudio\bin

Boy do I have a FIX for you guys. I had been screwing around with this same issue to no avail, until I came across an error that wouldn't let me download qt3d (something) and I know that was part of the installation choices so I decided to uninstall everything. A thing to note when uninstalling: the Maintenance Tool doesn't uninstall everything. There were still Qt files located in C:\Users\user\AppData\Roaming I needed to delete those. Also, I needed to go into the Registry Run >>> Regedit >>>> Edit >>> Find >>> then search for Qt and that brought up all of the QT keys that still remained. I just deleted them one by one. For the Reinstall I practically installed everything (within reason) here's the list of my installation selections. Happy Hunting Fellow Qt'errr's!

Qt 5.15.2

  • Web Assembly
  • MSVC 2015-64BIT
  • MSVC2019-32BIT
  • MSVC2019-64BIT
  • MinGW 8.1.0 32BIT
  • MinGW 8.1.0 64BIT
  • UWP ARMv7 (MSVC 2015)
  • UWP x64 (MSVC 2015)
  • UWP ARMv7 (MSVC 2019)
  • UWP x64 (MSVC 2019)
  • UWP x86 (MSVC 2019)
  • Android
  • SOURCES

Developer and Designer Tools

  • Qt Creator 4.15.1 CDB Debugger Support
  • Debugging Tools for Windows
  • Qt Creator 4.15.1 Debug Symbols
  • Qt Creator 4.15.1 Plugin Development
  • Qt 3D Studio 2.8.0 -MinGW 8.1.0 32BIT
  • MinGW 8.1.0 64BIT
  • Qt 3D Studio OpenGL Runtime 2.8.0
  • MinGW 7.3.0 64Bit
  • Qt Installer Framework 4.1
  • Cmake 3.19.2 32bit
  • Cmake 3.19.2 64bit
  • Ninja

License: I chose L GPL I chose Cmake not qmake

Graphic drivers were the issue in my case. Try updating or changing them.

Related