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. module "QtQuick.Dialogs" is not installed
Forum Updated to NodeBB v4.3 + New Features

module "QtQuick.Dialogs" is not installed

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 4.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.
  • C Offline
    C Offline
    Colton
    wrote on last edited by
    #1

    Trying to use the ColorDialog in Qt 1.15.2 for iOS. Every time I run the qml project, I get the error message:

    QQmlApplicationEngine failed to load component
    qrc:/main.qml:3:1: module "QtQuick.Dialogs" is not installed
    

    The import looks like this:

    import QtQuick.Dialogs 1.3
    

    Tried with versions 1.0, 1.1, 1.2, 1.3, 1.4 and 1.5, but no matter what, it keeps saying the same thing. Tried looking in the installer, but could not find anything missing. Qt Creator does not display any error messages and even gives a list of minor versions to select from.

    What am I doing wrong? Is there an alternative?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Maximilian Goldstein
      wrote on last edited by
      #4

      Sorry for the late reply,

      In the example you provided the cause of the issue is that you have your actual QML code and it's import in a library instead of the app proper, this breaks qmake's import scanning. That's why there's an additional file in the actual app project (main) that does nothing but import all the modules that the library needs. Once you add "import QtQuick.Dialogs" in there the example will work.

      If the subproject were a proper QML module I think this ought to work out of the box but the way this project is set up this is the only feasible way.

      Also, you may want to remove the link to the source code since you may not be allowed to distribute the non-LGPL template parts of it.

      Hope this helps.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Maximilian Goldstein
        wrote on last edited by
        #2

        Hello Colton,

        It would be very helpful if you could provide some more details, especially the full source code including any CMake/QMake files used to build this project? These might cause the QtQuick.Dialogs module to not be deployed properly.

        If you can reproduce it with any of Qt's builtin examples that would obviously be even better.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Colton
          wrote on last edited by Colton
          #3

          Was able to get the ColorDialog working with a new project. Created a minimal project that reproduces the 'module "QtQuick.Dialogs" is not installed' error (based on this template: https://marketplace.qt.io/products/qt-lgpl-app-template):

          Did not occur to me that it would be a problem with the project structure, thank you for bringing it to my attention.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Maximilian Goldstein
            wrote on last edited by
            #4

            Sorry for the late reply,

            In the example you provided the cause of the issue is that you have your actual QML code and it's import in a library instead of the app proper, this breaks qmake's import scanning. That's why there's an additional file in the actual app project (main) that does nothing but import all the modules that the library needs. Once you add "import QtQuick.Dialogs" in there the example will work.

            If the subproject were a proper QML module I think this ought to work out of the box but the way this project is set up this is the only feasible way.

            Also, you may want to remove the link to the source code since you may not be allowed to distribute the non-LGPL template parts of it.

            Hope this helps.

            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