Hi Folks,
i try to use QWebPage in a QThread, but this ever ends with:
QObject: Cannot create children
for a parent that is in a different thread.
QObject: Cannot create children for a parent that is in a different thread.
To copy to clipboard, switch view to plain text mode
can anyone tell me whats wrong with this code:
void WebKitThread::run(){
QWebPage p;
exec();
}
void WebKitThread::run(){
QWebPage p;
exec();
}
To copy to clipboard, switch view to plain text mode
?
WebKitThread is normally derived from QThread.
Run the programm with
QT_FATAL_WARNINGS=1
QT_FATAL_WARNINGS=1
To copy to clipboard, switch view to plain text mode
does not show more helpful messages. With every other QXxx class it is working! For example QDomDocument or QSqlDatabase.
QWebPage should be a normal QObject, so i cant see any reason why this should nod word!
I know that QWidgets cannot be used anywhere else than in the main GUI thread. Is it possible, that QWebPage has some references to QWidget i dont know from?
Bookmarks