Qt-interest Archive, December 2007
Unable to handle unregistered datatype 'OpenMode'
Message 1 in thread
Hi all
I'm in trouble trying to register a meta type in a QThread...
I always get this error:
QMetaObject::invokeMethod: Unable to handle unregistered
datatype 'OpenMode'
still after registering it using
Q_DECLARE_METATYPE(QIODevice::OpenMode)
in my .h and
qRegisterMetaType<QIODevice::OpenMode>("QIODevice::OpenMode");
in my .cpp code.
To solve this problem I had to change the registering this way:
qRegisterMetaType<QIODevice::OpenMode>("OpenMode");
Maybe
void QAbstractSocket::connectToHost (const QString &hostName, quint16
port, OpenMode openMode=ReadWrite)
has to be
void QAbstractSocket::connectToHost (const QString &hostName, quint16
port, QIODevice::OpenMode openMode=ReadWrite) ???
thanks
Giampaolo
--
[ signature omitted ]