c++ - How to register reference to Qt containers? -
I QQueue
qRegisterMetaType & lt; QQueue & lt; Double & gt; & Amp; & Gt; ("QQueue & lt; double & gt; & amp; quot;); I get the following error:
Error: 'qRegisterMetaType (const char [16])' does not match to make calls' How do I register it?
Whatever register you register it without reference.
qRegisterMetaType & lt; QQueue & lt; Double & gt; & Gt; (); You will also have to declare the metatip in each compilation unit where it will be used - ideally you should have an AF typed in your header file: < Pre> // ww. H. #fdf wquyuh #define dvalequayuh #includes & lt; QQueue & gt; Typipfif QUUU & LT; Double & gt; DoubleQueue; Q_DECLARE_METATYPE #endif
Then you will have to continuously use and register DoubleQueue - Remember that for moc , a Type is part of the text after snatching references, it must match exactly.
qRegisterMetaType & lt; Doublequite & gt; ();
Comments
Post a Comment