Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. qt quick wasm application exits with code -1 when i import "layouts"
Forum Updated to NodeBB v4.3 + New Features

qt quick wasm application exits with code -1 when i import "layouts"

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
1 Posts 1 Posters 294 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
    Mehmet Uysal
    wrote on last edited by Mehmet Uysal
    #1

    Hi, i'm new to qt creator. I'm working on a qt quick webassembly project. But i can't use layouts!

    import QtQuick 2.11
    import QtQuick.Controls 2.4
    import QtQuick.Controls.Material 2.4
    import QtQuick.Window 2.11
    import QtQuick.Layouts 1.3
    

    When i import QtQuick.Layouts in main qml file:

    bb009e55-d69a-49d6-b921-b1412bf3f448-image.png

    I'm not getting any errors on Qt Creator, not even using Layouts, application exits by just importing the module.

    I've also tried importing different versions of the module.

    Example qt quick projects with layouts in them are working fine. But when i create a new project i can't use layouts.

    import QtQuick 2.11
    import QtQuick.Controls 2.4
    import QtQuick.Controls.Material 2.4
    import QtQuick.Window 2.11
    //import QtQuick.Layouts 1.3
    

    It works properly when i don't import Layouts.

    Why? How am i going to use Layouts?

    .pro file of the project;

    QT += quick
    QT += qml quick
    
    # You can make your code fail to compile if it uses deprecated APIs.
    # In order to do so, uncomment the following line.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    SOURCES += \
            main.cpp
    
    RESOURCES += qml.qrc
    
    # Additional import path used to resolve QML modules in Qt Creator's code model
    QML_IMPORT_PATH =
    
    # Additional import path used to resolve QML modules just for Qt Quick Designer
    QML_DESIGNER_IMPORT_PATH =
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    1 Reply Last reply
    0

    • Login

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