⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Qt5: QQuickView lib missing?

  • Hi,
    Downloaded the .run version of the Qt5 release. Ubuntu 12.10.
    QtCreator runs fine. Default gui application also ok.
    But when I add in (main.cpp):
    #include <QtQuick/QQuickView>
    QQuickView *view = new QQuickView;

    I get this linking error:

    main.o: In function main': main.cpp:(.text.startup+0x33): undefined reference toQQuickView::QQuickView(QWindow*)'
    make: Leaving directory /home/wim/qt/qml2-build-Desktop_Qt_5_0_0_GCC_64bit_SDK-Release' main.cpp:(.text.startup+0x65): undefined reference toQQuickView::setSource(QUrl const&)'
    collect2: ld returned 1 exit status
    make: *** [qml2] Error 1
    18:24:33: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project qml2 (kit: Desktop Qt 5.0.0 GCC 64bit (SDK))
    When executing step 'Make'

    Don't know in which lib QQuickview lifes, but it seems missing.

  • If you use qmake, then you need to add the following line to your pro file:

    QT += quick

    "QQuickView":http://qt-project.org/doc/qt-5.0/qtquick/qquickview.html is part of the "QtQuick":http://qt-project.org/doc/qt-5.0/qtquick/qtquick-module.html module.

  • thks. I didn't do that in 4.8.

Log in to reply