QRegisterMetaType for vectors of custom Datatype



  • 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



  • 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).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.