[Interest] How to reset QML WebView?

Николай Шатохин n.shatokhin at gmail.com
Mon Jun 2 19:59:11 CEST 2014


Hello.

I have a web browser's window maked by QML from WebView.

And in C++ I create window:

if(_socialWindow == NULL)
    {
        _socialWindow= new QQuickView();
        _socialWindow->setFlags(Qt::Tool);
        _socialWindow->setResizeMode(QQuickView::SizeRootObjectToView);
        _socialWindow->setMinimumWidth(640);
        _socialWindow->setMinimumHeight(300);
    }

    _socialWindow->engine()->clearComponentCache();
    _socialWindow->setSource(QUrl(source)); // source is a patch to QML file

then I post to twitter and then I destroy window:

if(_socialWindow != NULL)
    {
        _socialWindow->deleteLater();
        _socialWindow = NULL;
    }

First time all is OK: I authorize and share. But second time browser opens
with logged user. How to clear window? Why did it not reset after delete
and create new?


Best regards,

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140602/5a88272e/attachment.html>


More information about the Interest mailing list