Important: Please read the Qt Code of Conduct -

Problem installing Qt5+DesktopComponents on Kubuntu 12.10: module QtDesktop not found

  • Hi.
    I have Qt5 and DesktopComponents compiled/installed from git to /usr/local/Qt-5.0.0, using Kubuntu 12.10. Going into /usr/local/Qt-5.0.0/imports/QtDesktop verifies the desktop components seem to have installed correctly.

    My PATH is set to /usr/local/Qt-5.0.0/bin:$PATH, and I have QtCreator built against Qt5. Yet, when I create simple QML app and try to run it, it fails with 'module "QtDesktop" not installed'

    Attempting to use QtWebKit also gives the module not installed error, which also seems to have been installed correctly to the imports directory. My hunch says i'm missing some kind of setup detail separating my Qt4/Qt5 installs but I can't seem to find much googling :(

    Here's the relevant code:

    Add more folders to ship with the application, here

    folder_01.source = qml/qtquick_tut = qml

    Additional import path used to resolve QML modules in Creator's code model

    QML_IMPORT_PATH = /usr/local/Qt-5.0.0/imports

    The .cpp file which was generated for your project. Feel free to hack it.

    SOURCES += main.cpp

    Please do not modify the following two lines. Required for deployment.


    // main.qml
    import QtQuick 2.0
    import QtDesktop 1.0 // remove this line and it works fine :/

    Rectangle {
    width: 360
    height: 360
    Text {
    text: qsTr("Hello World")
    anchors.centerIn: parent
    MouseArea {
    anchors.fill: parent
    onClicked: {
    Any help would be greatly appreciated!

  • See,37539 and the discussion about Qt4/Qt5 coinstallation on the development list:

    Use QML2_IMPORT_PATH for QtQuick2 imports.


Log in to reply