Qt Quick Form Editor cannot display window
-
HI,
I'm a relative newbie to Qt (used it a bit about 8 years ago). I've installed the default Qt 6.1 Open Source option on a Windows 10 machine, while I'm learning it.
I'm trying the tutorial, "Creating a Qt Quick Application" (Qt Quick Application - Empty), for MinGW 64-bit. I use the default options in the setup (but there is no step #8 where it asks for screen resolution).
main.qml is:
import QtQuick 2.15
import QtQuick.Window 2.15Window {
width: 640
height: 480
visible: true
title: qsTr("Hello World")
}When I go into Design view and select Form Editor, I get the error:
"Cannot open this QML document because of an error in the QML file:
Line: 1: Qt Quick emulation layer crashed."Can someone please point me to a solution for this? Thank you!
Lawrence
-
Addendum here: my online searches have found this error occurring in many previous versions, but none of them so far have had a definitive resolution.
I also downloaded the trial licenced version, and still had the same error (one of the postings I found suggested that the error only occurred in the opensource version).
When such a basic example doesn't work, it doesn't bode well for shelling out the cost of the commercial licence.
-
Hi, even i am facing the same issue with same configurations mentioned above ... Is there any solutions for this?
-
Hi friends,
I also encountered this issue and solved it in a rather strange way.
I have Qt Creator 7.0.2 based on Qt 6.2.3.
I have installed two development Kits:- Qt 5.15.2 MSVC 2019 64bits
- Qt 6.2.4 MSVC 2019 64bits
When I create a new QtQuick project with Qt 5.15.2 as main Kit my code is similar to you @L_A_Reeves :
import QtQuick 2.15 import QtQuick.Window 2.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello Canary") }
If I switch to the Design View, then I see the infamous bug :
But, If I add the build Kit Qt 6.2.4 to the project, select it and then switch to the Design View, here I can see my Window:
So my first conclusion is that, depending on the version of Qt used by your Qt Creator, you need to have the equivalent Kit selected
so that the Design View can interpret correctly your QML.
If you have Qt Creator based on Qt 6.x then I believe you need for your project to select a Qt Kit 6.x to be able to see your interface in the Design view.That's my first conclusion. Hope it helps somebody.