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

what is benefits of using qRegisterMetaType ?

Scheduled Pinned Locked Moved Solved General and Desktop
3 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
    #1

    I want to know when qRegisterMetaType get used in constructor ?

    i also want to know benefits of using it ?

    Pl45m4P 1 Reply Last reply
    0
    • Q Qt embedded developer

      I want to know when qRegisterMetaType get used in constructor ?

      i also want to know benefits of using it ?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @Qt-embedded-developer said in what is benefits of using qRegisterMetaType ?:

      i also want to know benefits of using it ?

      If your custom class is not a registered metatyp, you cant use your object in a cross-thread signal-slot-connection.
      It also allows to construct and destruct objects of this, now Qt-type, dynamically at runtime.

      https://doc.qt.io/qt-6/qmetatype.html#qRegisterMetaType-1


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      Q 1 Reply Last reply
      2
      • Pl45m4P Pl45m4

        @Qt-embedded-developer said in what is benefits of using qRegisterMetaType ?:

        i also want to know benefits of using it ?

        If your custom class is not a registered metatyp, you cant use your object in a cross-thread signal-slot-connection.
        It also allows to construct and destruct objects of this, now Qt-type, dynamically at runtime.

        https://doc.qt.io/qt-6/qmetatype.html#qRegisterMetaType-1

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

        @Pl45m4 Thanks

        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