Qt Forum

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

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

    QML and Qt Quick
    1
    4
    5595
    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
      kleimola last edited by

      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 Reply Quote 0
      • K
        kleimola last edited by

        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 Reply Quote 0
        • ?
          Guest last edited by

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

          1 Reply Last reply Reply Quote 0
          • K
            kleimola last edited by

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