I have forgotten to mention that i have tried the moveToThread() solution. It did not work.
Since yesterday, i have redesigned the thread, defined new signals, but i receive a compiler error (C2594 ambiguous conversion) during compilation of the moc file.
The error points to the following line in moc_ClassA.cpp:
void ClassA::signal1()
{
ERROR
->
QMetaObject::activate(this,
&staticMetaObject,
1,
0);
}
void ClassA::signal1()
{
ERROR-> QMetaObject::activate(this, &staticMetaObject, 1, 0);
}
To copy to clipboard, switch view to plain text mode
i can not use the suggested (by msdn) solution: "to use reinterpret_cast or static_cast explicitly", because i do not want to edit the moc file.
class ClassA
: public QThread,
public GUIWrapperClass, ...
{
...
}
class ClassA : public QThread, public GUIWrapperClass, ...
{
...
}
To copy to clipboard, switch view to plain text mode
where GUIWrapperClass inherits from QObject.
Is this the reason for the ambiguity? Now ClassA inherits both from QThread and GUIWrapperClass to QObject.
I HAVE TO USE GUIWrapperClass so that the ClassA works fine with our framework.
is there something one can do?
Bookmarks