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. Serialize application types as QVariant with IPC
QtWS25 Last Chance

Serialize application types as QVariant with IPC

Scheduled Pinned Locked Moved Unsolved General and Desktop
ipcqvariantserialization
1 Posts 1 Posters 731 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
    mistralegna
    wrote on 30 May 2016, 15:57 last edited by
    #1

    Hello all!

    I am currently working on several applications, communicating by IPC (QLocalSocket). The messages exchanged between the application are serialized in a QVariantHash (by design). In this hash, I have to transmit an internal type, let's say of class InternalType.

    The first app (client side) encodes the message as a QVariantHash with an entry with a value of type 'InternalType'. This app correctly registered the InternalType.

    The second app (server side) receives the message, and its aim is just to resend the message to a third app. So, this app doesn't have to know the exact type of InternalType. However, if the type InternalType is not registered using qRegisterMetaType<InternalType>(...), the reception of the message sent by the first app results as an empty QVariantHash.

    I would like to avoid to register a specific type in every applications that doesn't have to know it explicitly.

    Thank you in advance for your answers!

    1 Reply Last reply
    0

    1/1

    30 May 2016, 15:57

    • Login

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