Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Got errors when deployed QtQuick2 app
Forum Updated to NodeBB v4.3 + New Features

Got errors when deployed QtQuick2 app

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 4 Posters 12.4k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    Dmitriy V. Shmykov
    wrote on last edited by
    #1

    I want to make standalone app for Ubuntu Linux. So I've built app using qmake + make tools. In main.qml there're some imports
    @import QtQuick 2.0
    import QtQuick.Controls 1.1
    import QtQuick.Layouts 1.1
    import QtQuick.Window 2.1@

    After "qmake + make" I copy Qt5.3 so-files to my app's build directory (I know which libs I use after calling ldd tool). I copy plugins into their subdirectories after I've tried to run my app in clean Ubuntu with Qt5.3 prerequisites installed and got debug info with QT_PLUGINS_DEBUG=1 set. I run my app with LD_LIBRARY_PATH set to local directory where copied Qt5 libs are located.

    So now to app is loading all so-libs that it needs but catches errors with these console logs.

    @QQmlApplicationEngine failed to load component
    qrc:///main.qml:2 module "QtQuick.Controls" is not installed
    qrc:///main.qml:3 module "QtQuick.Layouts" is not installed
    qrc:///main.qml:4 module "QtQuick.Layouts" is not installed
    qrc:///main.qml:1 module "QtQuick" is not installed
    ...@

    Please help me to overcome this problem. I've read lots of docs about Qt5 apps' deployment rules but have no idea about proper ways of deploying Qt5 apps that use Qml. I don't want to force users of this app to install Qt5 manually. These users should be able to run their Ubuntu 12.04 LTS and install my app with simple prerequisites that can be installed automatically. As far as I know Qt5 is available in 14.04 LTS and it's not Qt5.3.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jsprenkle
      wrote on last edited by
      #2

      This might help:
      http://qt-project.org/doc/qt-4.8/deployment-plugins.html
      I don't believe you set up the plugin directory correctly.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dmitriy V. Shmykov
        wrote on last edited by
        #3

        What plugin I'm missing? E.g. I have ./platforms/libqxcb.so plugin library correctly loaded into the app. Other plugins

        @./platformthemes/libqgtk2.so
        ./generic/*
        ./platforminputcontexts/*@

        also loaded correctly. So what plugin I'm missing when I get such logs

        @QQmlApplicationEngine failed to load component
        qrc:///main.qml:2 module "QtQuick.Controls" is not installed
        qrc:///main.qml:3 module "QtQuick.Layouts" is not installed
        qrc:///main.qml:4 module "QtQuick.Layouts" is not installed
        qrc:///main.qml:1 module "QtQuick" is not installed
        ...@

        1 Reply Last reply
        0
        • C Offline
          C Offline
          chrisadams
          wrote on last edited by
          #4

          Set the QML2_IMPORT_PATH so that QML plugins can be found by the engine.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vovatool
            wrote on last edited by
            #5

            This worked for me http://lemirep.wordpress.com/2013/06/01/deploying-qt-applications-on-linux-and-windows-3/

            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