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. #include <QtQml/qqml.h> vs #include <QtQml>

#include <QtQml/qqml.h> vs #include <QtQml>

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 329 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.
  • P Offline
    P Offline
    paulmasri
    wrote on last edited by
    #1

    I've been trying to discover why some of my C++ classes (QML extensions) are working fine and some are not. The difference seems to be whether I #include <QtQml/qqml.h> or #include <QtQml>.

    Both cause QML_ELEMENT to be correctly colour-coded in the C++ class in Qt Creator.
    Both build without issues.

    But only #include <QtQml/qqml.h> results in correct colour-coding of the component in QML (after build) and runs without issues.

    For some reason #include <QtQml> results in Unknown component . (M300) error in QML (after build) and on run gives the error "Xxxxx is not a type".

    I thought that #include <QtQml> would include all parts of QtQML including qqml.h. Can anyone explain is this a bug in Qt or in my understanding?

    1 Reply Last reply
    0
    • kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      This sounds like a bug. I suggest creating a bug report for it, including a minimal example.

      Director R&D, The Qt Company

      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