Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. xmake 'QQmlApplicationEngine not found
Forum Updated to NodeBB v4.3 + New Features

xmake 'QQmlApplicationEngine not found

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 289 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.
  • R Offline
    R Offline
    redwest
    wrote on last edited by redwest
    #1

    Hi,

    I'm trying to compile a simple Qt QML project with xmake.

    My setup is the following:
    xmake.lua:

    add_rules("mode.debug", "mode.release")
    add_requires("qt6quick")
    target("test")
        add_rules("qt.widgetapp")
        add_packages("qt6quick")
        set_kind("binary")
        add_files("src/*.cpp")
    

    and my main.cpp:

    #include <stdio.h>
    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    
    
    int main(int argc, char** argv)
    {
        QCoreApplication::setOrganizationName("QtExamples");
        QGuiApplication app(argc,argv);
    
        QQmlApplicationEngine engine;
        engine.load(QUrl("PATH/TO/test.qml")); //path change to good path
        return app.exec();
    }
    

    This code is working well on my WSL setup with Ubuntu.

    But when i try this code in Windows, i have the following issue :
    2da1bcf6-512b-40e5-9276-7b92fc1e1843-image.png

    Do someone have a solution for this project to work in Windows. In order to use visual studio community with xmake.

    I've installed Qt6 with creator and so on.

    I prefer to keep xmake if possible.

    Thanks in advance,

    jsulmJ 1 Reply Last reply
    0
    • R redwest

      Hi,

      I'm trying to compile a simple Qt QML project with xmake.

      My setup is the following:
      xmake.lua:

      add_rules("mode.debug", "mode.release")
      add_requires("qt6quick")
      target("test")
          add_rules("qt.widgetapp")
          add_packages("qt6quick")
          set_kind("binary")
          add_files("src/*.cpp")
      

      and my main.cpp:

      #include <stdio.h>
      #include <QGuiApplication>
      #include <QQmlApplicationEngine>
      
      
      int main(int argc, char** argv)
      {
          QCoreApplication::setOrganizationName("QtExamples");
          QGuiApplication app(argc,argv);
      
          QQmlApplicationEngine engine;
          engine.load(QUrl("PATH/TO/test.qml")); //path change to good path
          return app.exec();
      }
      

      This code is working well on my WSL setup with Ubuntu.

      But when i try this code in Windows, i have the following issue :
      2da1bcf6-512b-40e5-9276-7b92fc1e1843-image.png

      Do someone have a solution for this project to work in Windows. In order to use visual studio community with xmake.

      I've installed Qt6 with creator and so on.

      I prefer to keep xmake if possible.

      Thanks in advance,

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @redwest QQmlApplicationEngine is part of qml module (as can be seen in the documentation), so I guess you need to add qml module to your xmake.lua file.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      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