QWebView stops responding



  • I have a SLOT in which a create an instance of my WebView which is QWebView. The problem is that if that SLOT is called second time, the Webkit core crashes or the window stops responding (or something else, I am not sure what fails).

    This is my WebView:

    @ WebView::WebView(QWidget *parent) :
    QWebView(parent)
    {}

    void WebView::cleanUp(){
        this->hide();
        this->close();
    }
    
    void WebView::showWeb(QString link){
        QUrl url(link);
        this->load(url);
        this->show();
    
        connect(this->page(), SIGNAL(windowCloseRequested()), SLOT(cleanUp()));
    }@
    

    And the SLOT contains this:

    @ WebView* webView = new WebView();
    webView->showWeb(link);@

    This is how second webview looks like: !http://i.stack.imgur.com/rlzMq.png(WebView)! That is the actual webview, frozen, after a few seconds the app shows that it stopped responding and I have to force quit it. First WebView loads the url just fine.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.