Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. relate to qmlRegisterType
QtWS25 Last Chance

relate to qmlRegisterType

Scheduled Pinned Locked Moved Unsolved India
6 Posts 3 Posters 2.3k 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.
  • M Offline
    M Offline
    Monikarajendra
    wrote on last edited by aha_1980
    #1

    qmlRegisterType<BackEnd>("io.qt.examples.backend", 1, 0, "BackEnd");can somebody specify what to give for the first parameter "io.qt.examples.backend" to register a class in QML and am getting error as qmlRegisterType is not declared in the scope

    sierdzioS 1 Reply Last reply
    0
    • M Monikarajendra

      qmlRegisterType<BackEnd>("io.qt.examples.backend", 1, 0, "BackEnd");can somebody specify what to give for the first parameter "io.qt.examples.backend" to register a class in QML and am getting error as qmlRegisterType is not declared in the scope

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @Monikarajendra said in relate to qmlREgisterType:

      qmlRegisterType is not declared in the scope

      You have to include the correct header.

      #include <QQmlEngine>
      

      can somebody specify what to give for the first parameter "io.qt.examples.backend"

      While your issue has nothing to do with that URL, I'll still answer: it can be anything. Any string (well let's say any ascii alphanumeric string).

      (Z(:^

      1 Reply Last reply
      2
      • M Offline
        M Offline
        Monikarajendra
        wrote on last edited by
        #3

        even after including that appropriate headerfile am still facing the same error

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Hm that's unlikely. Is your BackEnd a qobject?

          (Z(:^

          1 Reply Last reply
          0
          • S Offline
            S Offline
            shaan7
            wrote on last edited by
            #5

            @Monikarajendra can you paste the exact error? Makes it much easier to find out the solution.

            1 Reply Last reply
            2
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              One more question: are you using Qt 4 by any chance?

              (Z(:^

              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