Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

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

    Installation and Deployment
    2
    2
    779
    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.
    • K
      KrabQT last edited by KrabQT

      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 Reply Quote 0
      • M
        mcosta last edited by

        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 Reply Quote 0
        • First post
          Last post