Qt QWebPage runtime c++ error -


im using qt 5.0 + mingw build applications , want use "webkitwidgets" module. add in .pro file

qt += webkitwidgets 

then in code created thread , thread wrote:

 qwebpage page; 

when debugger gets line, debug terminates following error:

"microsoft visual c++ runtime library

this application has requested runtime terminate unusual way. please contact application's support team more infomation."

so cant declare variable of type qwebpage. why happens , there way fix it?

when experiencing crashes this, first watch stdout, stderr , debug channel, run in debugger.

however, created qwebpage in thread: won't work. in qt (and other ui toolkits), ui classes must live in main thread, i.e. 1 qapplication lives in. move declaration main thread , should work. also, creating instance on stack right thing if block isn't left before application quits (usually that's case in main()). otherwise must create on heap.


Comments