signals: void objsAvailable(QList<MyObject> &objs);
private slots: void processObjects(QList<MyObject> &objs);
ObjMakerThread *thread = new ObjMakerThread(blahParam, this); connect( thread, SIGNAL(objsAvailable(QList<MyObject>&)), this, SLOT(processObjs(QList<MyObject&>&)) ); thread->start();
QObject::connect: Cannot queue arguments of type 'QList<MyObj>&'
(Make sure 'QList<Mail>&' is registered using qRegisterMetaType().)
So I added
Q_DECLARE_METATYPE()
to the myobject.h
and I called qRegisterMetaType<MyObject>("MyObject"); in main()
But still no dice.. Any clues?
Thanks guys
(note that I can pass a pointer to the QList around, but I was hoping not to)
Last edited by cjard; 2010-03-12 at 11:35.