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. QRegisterMetaType for vectors of custom Datatype

QRegisterMetaType for vectors of custom Datatype

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.4k 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.
  • S Offline
    S Offline
    sruthihsr
    wrote on last edited by
    #1

    Hi
    I tried the following to access Data over QtDbus
    @
    qRegisterMetaType<StructA>("StructA");
    qRegisterMetaType<std::vector <StructA> >("std::vector <StructA>");
    @
    I get the following error
    ‘QMetaTypeId<std::vector<StructA, std::allocator<StructA> > >’

    Please help me on how to register Std Vector of Custom Datatype

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris H
      wrote on last edited by
      #2

      At what point are you getting an error? When you compile, or during the run? And is that actually the full error text? Your example compiles and runs fine for me (though I haven't tried actually using the type).

      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