Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Cannot find QtQml/qqmlregistration.h
Forum Updated to NodeBB v4.3 + New Features

Cannot find QtQml/qqmlregistration.h

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 331 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.
  • Tom assoT Offline
    Tom assoT Offline
    Tom asso
    wrote on last edited by
    #1

    Documentation says that my C++ app must include the following in order to get the Q_ELEMENT definition:

    #include <QtQml/qqmlregistration.h>
    

    However I cannot find that header file on my ubuntu 22 system. I installed Qt/QML on this system as follows:

    % sudo apt install qtscript5-dev qml-module-qtquick-dialogs qml-module-qtquick-controls qml-module-qtquick-controls2 libqt5datavisualization5 qml-module-qt-labs-platform libqt5datavisualization5-dev qml-module-qtdatavisualization qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel libqt5quickcontrols2-5 libqt5multimedia5 libqt5webengine5 libqt5quick5 libqt5qml5 qtdeclarative5-dev libxcursor-dev
    

    What am I missing?
    Thanks!

    GrecKoG 1 Reply Last reply
    0
    • Tom assoT Tom asso

      Documentation says that my C++ app must include the following in order to get the Q_ELEMENT definition:

      #include <QtQml/qqmlregistration.h>
      

      However I cannot find that header file on my ubuntu 22 system. I installed Qt/QML on this system as follows:

      % sudo apt install qtscript5-dev qml-module-qtquick-dialogs qml-module-qtquick-controls qml-module-qtquick-controls2 libqt5datavisualization5 qml-module-qt-labs-platform libqt5datavisualization5-dev qml-module-qtdatavisualization qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel libqt5quickcontrols2-5 libqt5multimedia5 libqt5webengine5 libqt5quick5 libqt5qml5 qtdeclarative5-dev libxcursor-dev
      

      What am I missing?
      Thanks!

      GrecKoG Offline
      GrecKoG Offline
      GrecKo
      Qt Champions 2018
      wrote on last edited by
      #2

      It seems you installed Qt 5, this header file is for Qt 6.

      In Qt 5 you can use qqml.h for the QML_ELEMENT macros and friends but this is not compatible with CMake AFAIK.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved