Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Qt5: QQuickView lib missing?

    General and Desktop
    2
    3
    4079
    Loading More Posts
    • 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.
    • W
      wspilot last edited by

      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;
      view->setSource(QUrl::fromLocalFile("test0.qml"));
      view->show();@

      I get this linking error:

      main.o: In function main': main.cpp:(.text.startup+0x33): undefined reference to QQuickView::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 to QQuickView::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.

      1 Reply Last reply Reply Quote 0
      • podsvirov
        podsvirov last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • W
          wspilot last edited by

          thks. I didn't do that in 4.8.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post