PDA

View Full Version : Webkit open new javascript Page



ShapeShiftme
18th October 2012, 05:44
Good day I.

I have a program that use webkit and it works great but i have 3 webpages that use java window.open to open new pages and work great under firefox etc.

How can i in webkit detect if a link with window.open is called and then capture the page it was opening so that i can create a new instance of qwebkit and send it the url.

Any help would be appriociated.

I did see something about


_parentFrame->evaluateJavaScript("window.open("", "");");
but i dont know how to impliment it.


Regards

ChrisW67
18th October 2012, 06:24
Take a look at QWebView::createWindow() and QWebPage::createWindow()

ShapeShiftme
18th October 2012, 08:54
Thanks you for the code suggestion.

But i cant see a signal for createwebpage.

How do i link the function to a slot() or how to i use sorry for the noob question

my webview is "ui->Webview"

ShapeShiftme
25th October 2012, 08:46
Sorry to bump this but can anyone please help