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. what is benefits of using qmlRegisterSingletonType ?
Forum Updated to NodeBB v4.3 + New Features

what is benefits of using qmlRegisterSingletonType ?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 398 Views 1 Watching
  • 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.
  • Q Offline
    Q Offline
    Qt embedded developer
    wrote on last edited by Qt embedded developer
    #1

    i want to know the benefits of using :

    1. qmlRegisterSingletonType
    2. qmlRegisterUncreatableType
    3. qmlRegisterType
    1 Reply Last reply
    1
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You get a singleton, what else? A single instance of an object, storing the same state no matter where you access it.

      (Z(:^

      Q 1 Reply Last reply
      2
      • sierdzioS sierdzio

        You get a singleton, what else? A single instance of an object, storing the same state no matter where you access it.

        Q Offline
        Q Offline
        Qt embedded developer
        wrote on last edited by
        #3

        @sierdzio can you tell me benefits of using qmlRegisterUncreatableType
        & qmlRegisterType ?

        sierdzioS 1 Reply Last reply
        0
        • Q Qt embedded developer

          @sierdzio can you tell me benefits of using qmlRegisterUncreatableType
          & qmlRegisterType ?

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

          qmlRegisterUncreatableType

          Use it if you need to expose type information but your don't need to instantiate it. For example, you can use it to expose an enum to QML.

          qmlRegisterType

          This fully registers a Q_OBJECT to be used in QML. You can instantiate it in QML, modify it's properties etc.

          (Z(:^

          1 Reply Last reply
          4

          • Login

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