Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error: undefined reference to QQuickRectangle::QQuickRectangle(QQuickItem*)
Forum Updated to NodeBB v4.3 + New Features

Error: undefined reference to QQuickRectangle::QQuickRectangle(QQuickItem*)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 960 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.
  • K Offline
    K Offline
    KrabQT
    wrote on last edited by KrabQT
    #1

    I want to use Qt Quick 2 directly from C++ without those qml/javascript stuffs that could slows down the app, but i got compilation error when using QQuickRectangle.

    In .pro file i have: QT += quick quick-private core-private gui-private declarative-private qml-private

    and in .cpp file - #include <private/qquickrectangle_p.h>

    I compiled the Qt 5.5 from sources and the command nm -D /usr/local/Qt-5.5.0/lib/libQt5Quick.so.5 | grep "Rectangle"
    doesn't print anything related to QQuickRectangle, so it looks that it is not included in the shared library, but i don't know why, because the qquickrectangle.cpp exists in qt sources, so it should be included in the shared library after compilation.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      without those qml/javascript stuffs that could slows down the app,

      have you proof of that? Best practice is to write your code; test profile and then optimize slow parts.

      In .pro file i have: QT += quick quick-private core-private gui-private declarative-private qml-private
      and in .cpp file - #include <private/qquickrectangle_p.h>

      you're using private classes that are not exposed in the public libraries

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      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