PDA

View Full Version : WtWebKit Setting? Please help!



LDel001
17th October 2011, 22:39
I am working through various Qt examples on the internet, in order to familiarise myself with the platform.

any how, I have been looking at the "fancybrowser" example at the following website : http://doc.qt.nokia.com/stable/webkit-fancybrowser.html

It basically shows how to make a simple web browser. It runs nicely and I am happy with it, except it doesn't seem to do certain things, Ajax seems to be disabled, possibly as a result of javascript being disabled? I would like to have this running in a way that it is capable of running web 2.0 sites. Does anyone know what changes I would need to make?

I know it is supposed to be enabled by default, but I can't seem to get things like facebook to run properly... So I am guessing it is JS or Scripting related?

Thanks.

wysota
18th October 2011, 07:10
Have a look at QWebSettings::setAttribute().

LDel001
18th October 2011, 17:37
is there a chance you could please give me an example of how to use this? I have tried reading the document and haven't managed to produce a line of code that Qt likes.

wysota
18th October 2011, 20:09
QWebSettings::globalSettings()->setAttribute(QWebSettings::JavascriptEnabled, true);

LDel001
19th October 2011, 16:57
Sorry for the late reply, thanks! I will give this a run when I head home from work tonight :)

Much appreciated.