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. Cannot choose QtQuick version in Ubuntu
Qt 6.11 is out! See what's new in the release blog

Cannot choose QtQuick version in Ubuntu

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 911 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
    riffraff
    wrote on last edited by
    #1

    I have installed qt in Ubuntu. Here are some details about the Ubuntu and QT installation:

    $ lsb_release  -a
    LSB Version:	core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
    Distributor ID:	Ubuntu
    Description:	Ubuntu 18.04.6 LTS
    Release:	18.04
    Codename:	bionic
    
    $ aptitude versions qml-module-qtquick2
    Package qml-module-qtquick2:                              
    p   5.9.5-0ubuntu1                                              bionic                                   500 
    i   5.9.5-0ubuntu1.1                                            bionic-updates                           500 
    
    Package qml-module-qtquick2:i386:
    p   5.9.5-0ubuntu1                                              bionic                                   500 
    p   5.9.5-0ubuntu1.1                                            bionic-updates                           500
    
    $ qmake --version
    QMake version 3.1
    Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu
    

    I am building the application successfully, without any error or warning, from terminal command line:

    $ qmake
    $ make
    

    In this application, I need the QtQuick version 2.15. However, if I import it in the main.qml...

    import QtQuick 2.15
    

    ... I get this runtime error when I start the application:

    09:30:29,030 Warning: QQmlApplicationEngine failed to load component
    09:30:32,164 Warning: qrc:/main.qml:1 module "QtQuick" version 2.15 is not installed
    

    I can start it only if I import lower QtQuick versions (e.g. 2.9).

    Note 1: in the same machine, I have also installed Qt using the installer qt-unified-linux-x64-4.1.1-online.run downloaded from https://www.qt.io/download. If I build the same application and run it with the debugger, with the GUI of qtcreator, I don't have this problem: the QtQuick 2.15 is successfully imported.

    Note2: when I install the qtquick...

    sudo apt-get install qml-module-qtquick-controls2
    

    It installs the version 5.9.5, which doesn't include the QtQuick 2.15.

    What should I do to install properly the qt library, in order that I can import the QtQuick 2.15 in the main.qml when starting the program with the command line?

    How can I force the "apt-get install" to install a newer version than 5.9.5?

    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