Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Executable doesn't work, error "QtQuick.Extras" is not installed.
Forum Updated to NodeBB v4.3 + New Features

Executable doesn't work, error "QtQuick.Extras" is not installed.

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 2.0k 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.
  • P Offline
    P Offline
    Philomath-Qt
    wrote on 28 Dec 2020, 03:21 last edited by Philomath-Qt
    #1

    Hi there,

    i had a similar problem a few days ago with qmake, but this time i can't find out the origin.

    I transformed the Qt "Dashboard" Example into a CMakeLists.txt project called "DashInCmake" in order to use cmake instead of qmake.
    I finally made it work in the QtCreator, but creating a build folder, where i runcmake .. , make and finally ./DashInCmake turns out the following error:

    QQmlApplicationEngine failed to load component
    qrc:/qml/dashboard.qml:55 module "QtQuick.Extras" is not installed
    qrc:/qml/dashboard.qml:56 module "QtQuick.Timeline" is not installed
    qrc:/qml/dashboard.qml:55 module "QtQuick.Extras" is not installed
    qrc:/qml/dashboard.qml:56 module "QtQuick.Timeline" is not installed
    

    Everything runs perfectly fine in QtCreator. The Kit i use in QtCreator to configurate the project uses my systems cmake: /snap/bin/cmake , therefore i don't get why it's not working in the terminal. In my CMakeLists.txt file i add the package by

    find_package(Qt5 COMPONENTS Quick REQUIRED)
    

    and

    target_link_libraries ("${TARGET_NAME}" Qt5::Quick)
    

    I use:

    cmake version 3.19.2
    Qt version 5.15.2
    Ubuntu 18.04.5 LTS
    amd64

    Does someone has any advice?

    Kind regards

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Philomath-Qt
      wrote on 28 Dec 2020, 21:54 last edited by
      #2

      Hi,
      I solved the issue but don't know how. I already tried to solve the problem yesterday by adding

      set(CMAKE_PREFIX_PATH "/home/michael/Qt/5.15.2/gcc_64/lib/cmake") 
      

      to the CMakeLists.txt file, but again, everything worked out in the QtCreator, but the Executable created with the Terminal gave me back the error.

      I just repeated the step and suddenly the executable works as well. Maybe it also has something to do with updating my system meanwhile, i don't know.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 28 Dec 2020, 22:27 last edited by
        #3

        Hi,

        Qt Creator will set the CMAKE_PREFIX_PATH to match the Kit you use. When you go to the command line you have to do it yourself. What happens currently is that cmake detects your system installed Qt. Therefore the correct thing to do is to add "-DCMAKE_PREFIX_PATH=<path_to_qt>/lib/cmake" to your cmake call.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        1/3

        28 Dec 2020, 03:21

        • Login

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