[Qt-interest] webkit - how to prevent alert popups
Richard Baron Penman
richardbp at gmail.com
Sun Sep 19 13:10:44 CEST 2010
thanks! Much more clean.
On Fri, Sep 17, 2010 at 4:26 PM, KIMURA, Hidetaka <kimura at jig.jp> wrote:
> Hi Richard,
>
> You don't need to modify the HTML. You can inherit QWebPage and override
> QWebPage::javaScriptAlert to prevent the popups. Then set the page using
> QWebView::setPage.
>
> class MyWebPage : public QWebPage {
> protected:
> virtual void javaScriptAlert (QWebFrame*, const QString &) {}
> };
>
> webView.setPage(new MyWebPage());
>
> -------
> KIMURA, Hide - kimura at jig.jp
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100919/c056f562/attachment.html
More information about the Qt-interest-old
mailing list