Qt World Summit: Register Today!


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

    Window {
    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?



  • I also want to know if any of you managed to get it working Qt Creator 4.5.1 with Qt6 and Designer



  • same here on QT Creator 6.0.1. If you click on Design you can't see the main window. You can see it but it is just a point. Yes zoom is already on 100%



  • 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 :
    2022-07-15 15_25_26-main.qml @ Canary - Qt Creator.png

    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:
    2022-07-15 15_27_08-main.qml @ Canary - Qt Creator.png

    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.


Log in to reply