7

I just made the fresh QT installation and when I create empty QT Quick project or open any of existing QT Quick examples, my QML designer doesn't work. It shows "Cannot Connect to QML Emluation Layer (QML Puppet)" error.

I tried to reinstall QT, reboot, installed additional QT kit versions and tried to switch between 32bit/64bit default/opengl versions of the kit and nothing seems to work for me. I was able to successfully run the designer ONCE, and after I closed it and tried to re-open the file it stopped working again. I also tried to search, but didn't find any solution. I also tried to ask on QT forums, but didn't receive any answer.

My system is Windows 7, with Visual Studio 2013 installed. Thanks for your help!

splattru
  • 608
  • 1
  • 9
  • 19
  • 3
    Possibly related to [this bug](https://bugreports.qt.io/browse/QTCREATORBUG-13029). Just try this workaround: in the Options dialog go to “Qt Quick / Qt Quick Designer / QML Emulation Layer” and disable the checkbox “Always use the QML emulation layer prived by Qt Creator”. That will cause a rebuild of the emulation layer with the used Qt version in the current project. That layer does not crash. This workaround only works with Desktop Kits. – BaCaRoZzo Mar 30 '15 at 13:01
  • BaCaRoZzo, I tried this and it didn't work for me (nothing changed). Thank you for your answer anyway! – splattru Mar 31 '15 at 18:02
  • Was worth a try, anyway. :) Hope someone else can help you with this strange issue. – BaCaRoZzo Mar 31 '15 at 18:15
  • 1
    @BaCaRoZzo These options aren't available in the latest version of Qt Creator 4.1.0. I'm able to enter design mode once, but if I try to again I get this error. Closing and reopening doesn't fix the problem. Reinstalling does, but the problem just occurs again. I tried setting a fallback QML emulation layer to this path: C:\Qt\Tools\QtCreator\share\qtcreator\qml\qmlpuppet but that didn't work. Any thoughts? – Mike Bourbeau Sep 16 '16 at 15:46

4 Answers4

9

Do this:

  • Go to QT Creator Preferences (Menu Bar | Tools > Options)

  • Select QT Quick Option (Options headings - left side).

  • Click the QT Quick Designer tab.

  • Under QML Emulation Layer grouping, select "Use QML Emulation Layer that is built with selected QT".

No need to choose a path,

  • And click OK.

It will rebuild your designer view. Worked for me.

CybeX
  • 2,060
  • 3
  • 48
  • 115
yantronica
  • 353
  • 1
  • 3
  • 12
2

Possibly related to this bug. Just try this workaround: in the Options dialog go to “Qt Quick / Qt Quick Designer / QML Emulation Layer” and disable the checkbox “Always use the QML emulation layer prived by Qt Creator”. That will cause a rebuild of the emulation layer with the used Qt version in the current project. That layer does not crash. This workaround only works with Desktop Kits. – BaCaRoZzo Mar 30

This worked for me on Ubuntu 14.04.

ramses728
  • 323
  • 2
  • 12
  • This worked for me, but still crashed a few times at the outset, when I would switch out of designer mode and back. It started working better after I had been playing with the split view / text-editor / form-editor toggles on the edge of the editor in designer mode. Also, as stated above this only fixes desktop kits. – Colin Nov 11 '17 at 17:29
1
  1. Go to Tools->Options->Qt Quick.
  2. In QML Emulation Layer, make sure the path is correct for "Use fallback QML emulation layer".

Since I was reinstalling Qt, the new installation had the old path of Qt which gave rise to this issue.

mutp
  • 2,301
  • 1
  • 17
  • 13
0

If failed anyway, use "Qt Design studio" instead and build it again, it worked for me.

I recommend to uninstall Qt first and then reinstall it with "Qt Design Studio" box checked.

On Ubuntu 20 LTS, you can run it on: /home/Qt/Tools/QtDesignStudio/bin/qtdesignstudio

Good luck.