[Qt-interest] JavascriptCanOpenWindows can't
Kelly Burkhart
kelly.burkhart at gmail.com
Thu Jan 14 16:52:15 CET 2010
OK, I found it: I need to reimplement QWebView::createWindow.
On Wed, Jan 13, 2010 at 3:52 PM, Kelly Burkhart
<kelly.burkhart at gmail.com> wrote:
> Hello,
>
> I'm working with QtWebKit and am trying to make javascript interact
> with my c++ code. I've written a trivial application that loads html
> from a file. The html provides a couple of buttons that trigger
> javascript functions. I've exposed a c++ object into the javascript
> context with QWebFrame::addToJavaScriptWindowObject and am able to
> trigger a c++ slot with a javascript function.
>
> I'm now trying (and failing) to open a new window from a javascript function:
>
> window.open("test_page.html", "", "resizable=1");
>
> This works from firefox and from arora, but from my app, no new window
> appears. I have set the JavascriptEnabled and
> JavascriptCanOpenWindows websettings. Should QtWebKit interpret the
> window.open call and pop up a new window for me? Or do I need to
> intercept that call somehow from the c++ side of things and create a
> new window myself?
>
> Thanks in advance for your help,
>
> -Kelly
>
More information about the Qt-interest-old
mailing list