Cannot queue arguments of type 'QStringList'
With QT 4.1, I'm trying to connect a signal from a worker thread (child of QThread) to a slot in a class which is a child of QWidget and pass a QStringList as the argument:
Code:
connect(m_workerThread, SIGNAL(setSystemUserNames(const QStringList&)),
this, SLOT(setSystemUserNames(const QStringList&)));
But when I run the program I get this error message and the connection isn't established:
Quote:
QObject::connect: Cannot queue arguments of type 'QStringList'
Both methods in m_workerThread and the GUI class are defined as:
Code:
void setSystemUserNames(const QStringList& userNames);
I've tried changing it to simply "QStringList userNames" (so, not const&), but still get the same warning. Am I missing something? Any idea?
Re: Cannot queue arguments of type 'QStringList'
Try:
Code:
qRegisterMetaType<QStringList>("QStringList");
Re: Cannot queue arguments of type 'QStringList'
or use QVariant holding a list (QVariant(QStringList)) instead of QStringList.