Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.4.1
-
None
-
QWebChannel project's test folder, using Qt 5.5 layman overlay, installed on Gentoo Linux.
-
e354bdc5cbe33621def2b200f01d6376291570fc
Description
Creating a class and moving it to a thread in a different QThread prevents QWebChannel's queued interaction.
To Reproduce:
- Implement a new class which contains at least 1 public slot (void return)
- Create an instance of custom class derived from QObject > myClass
- Create an instance of QThread > myClassThread
- move myClass to the newly created thread > myClass.moveToThread(myClassThread)
- Create an instance of QWebChannel object > myWebChannel (do required websocket connections)
- Register your object to webchannel > myWebChannel.registerObject(QStringLiteral("myClass"), myClass)
- Run applicaiton and call public slot of myClass from web application.
Then it throws an error as below and does not run method.
QMetaObject::unable to invoke methods with return values in queued connections