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. A few questions/issues related to Qt Declarative in Qt 4.7.0

A few questions/issues related to Qt Declarative in Qt 4.7.0

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 1 Posters 5.8k 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.
  • K Offline
    K Offline
    kleimola
    wrote on last edited by
    #1
    1. According to documentation qmlRegisterType<T>() should be a "related non-member of QDeclarativeEngine", but including that library only results in "'qmlRegisterType' was not declared in this scope" error. Seems that QDeclarativeComponent must be included instead?

    2. If QDeclarativeComponent or QDeclarativeItem is included (with #include ..") in a subclass of QDeclarativeView on Windows it results in errors about "int qmlRegisterInterface(const char*)" in qdeclarative.h and will not compile at all. Is this related to naming pollution still? Wasn't that supposed to be fixed already in 4.7.0 ?

    3. qmlRegisterType cannot be used in a subclasses of QDeclarativeView (propably because of the reason 2 above)?

    >> Johannes <<

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kleimola
      wrote on last edited by
      #2

      This might all be due to a bug in Qt itself. No compile errors is generated if the #include <QDeclarativeItem> is defined before #include <QGLFormat> (in an example were I encountered this problem). This was pointed out by Kim Grönholm form QUIt Coding. He also reported this as a bug. But still I wonder why qmlRegisterType does not derive from QDeclarativeEngine...

      >> Johannes <<

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on last edited by
        #3

        thanks johannes, I was trying to run the 5inarow game, your post was helpful :)

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kleimola
          wrote on last edited by
          #4

          Kim informed me that the include order issue above has been addressed and is fixed in Qt 4.7.1

          >> Johannes <<

          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