Description
I have a QWebView that opens a local web page on my computer, and everything works perfectly in Qt4.8. (It also works with a browser). But after porting the software to Qt5.0.2 (and making the change from QWebView to QtWebKitWidgets/QWebView, the program appears to hang, then crashes with the following output:
QIODevice::read: maxSize argument exceeds QByteArray size limit.
terminate called after throwing an instance of ‘std::bad_alloc’
what(): std::bad_alloc
Here’s the code:
HelpManager::HelpManager(QObject *parent) :
QObject(parent)
void HelpManager::loadIsStarted()
{ qDebug() << "loadIsStarted"; }void HelpManager::loadInProgress(int progress)
{ qDebug() << "loadInProgress, progress =" << progress; }void HelpManager::loadIsFinisehd(bool isOk)
{ qDebug() << "loadIsFinshed, status = " << isOk; }Here is the successful output using Qt4.8
loadIsStarted
loadInProgress, progress = 10
loadInProgress, progress = 10
loadInProgress, progress = 27
loadInProgress, progress = 29
loadInProgress, progress = 32
loadInProgress, progress = 36
loadInProgress, progress = 36
loadInProgress, progress = 36
loadInProgress, progress = 90
loadInProgress, progress = 90
loadInProgress, progress = 90
loadInProgress, progress = 90
loadInProgress, progress = 90
loadInProgress, progress = 100
loadIsFinshed, status = true