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. QQuickView in a Library
Qt 6.11 is out! See what's new in the release blog

QQuickView in a Library

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.8k Views 1 Watching
  • 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.
  • I Offline
    I Offline
    Itehnological
    wrote on last edited by
    #1

    Why I can't use QQuickView in a subdir library project. Whenever I call it I get the following output:

    DEBUG:
    @
    Qt5/5.0.0/gcc/include/QtQml/qqmldebug.h:61: undefined reference to QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool)' application.cpp:7: undefined reference to QQuickView::QQuickView(QWindow*)'
    libApplication.a(application.o): In function __static_initialization_and_destruction_0': Qt5/5.0.0/gcc/include/QtQml/qqmldebug.h:61: undefined reference to QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool)'
    @

    RELEASE:
    @
    application.cpp:(.text+0x63): undefined reference to `QQuickView::QQuickView(QWindow*)'
    @

    Here is a copy of my .pro file
    @QT += network opengl widgets quick

    TARGET = Application
    TEMPLATE = lib
    CONFIG += staticlib

    SOURCES += application.cpp

    HEADERS += application.h
    unix:!symbian {
    maemo5 {
    target.path = /opt/usr/lib
    } else {
    target.path = /usr/lib
    }
    INSTALLS += target
    }
    @

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dempl
      wrote on last edited by
      #2

      I know it's a reply after year and a half , but I'll put it just in case someone else needs it :-) .

      Since I'm assuming this is GCC/Linux (and it looks like one :-) ), you need to install qt quick from your package manager. Many distros (like Ubuntu) don't include entire Qt Liibrary in one package (maybe because of the size), and you just need to install everything from package manager.

      If it's ubuntu just look up "qt quick" in Synaptic.

      Hope this helps!
      Cheers!
      Dushan

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Itehnological
        wrote on last edited by
        #3

        : ) Thanks for the response and for the answer. I have no way to test it, but I am pretty sure that's the solution. Thanks!

        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