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. Qt5: QQuickView lib missing?
QtWS25 Last Chance

Qt5: QQuickView lib missing?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 4.4k 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.
  • W Offline
    W Offline
    wspilot
    wrote on last edited by
    #1

    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
    0
    • podsvirovP Offline
      podsvirovP Offline
      podsvirov
      wrote on last edited by
      #2

      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
      0
      • W Offline
        W Offline
        wspilot
        wrote on last edited by
        #3

        thks. I didn't do that in 4.8.

        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