I need to handle the QWebpage close event in QWebview.How it will be possible,please explain with code.
I need to handle the QWebpage close event in QWebview.How it will be possible,please explain with code.
hi,
How to Close a QWebpage in QWebView ,if the webpage closed automatically then how can i handle that event please give me some directions with relavent code
my code is
QWebView *wv = new QWebView();
QWebPage *page = wv->page();
QWebSettings *settings = page->settings();
settings->setAttribute(QWebSettings::JavascriptEnabled, true);
settings->setAttribute(QWebSettings::PluginsEnabled, true);
settings->setAttribute(QWebSettings::PrivateBrowsingEnabled , true);
QUrl url = QUrl("http://www.google.com");
wv->load(url);
wv->show();
now i need to close the webpage(google),if that webpage is closed automatically then how can i handle that event?
What do you mean by closing a web page? You can close only application or window.
I wanna to close the window when the Webview doesnt have the webpage (if the webpage is automatically closed).
I have the situation like this,
by using webview i am displaying some webpages,after completion of the task through the webpages automatically that webpage will be closed.then i need to catch the close event of the webpage and need to display another window
please help me,i searched all the possibilities in net but i didnt find any solution please give me a solution for this
Last edited by divanov; 2011-03-14 at 12:26.
Nice desire.
yes i will allow to close the webpage by javascript, but this action will be done by the webdeveloper not by me,so how can i handle the webpage close event thats my doubt,
please advise me
is it possible?its requirement Daniil please advise me how to do.
The general advice would be for you to always look for existing work with similar features.
See for example the http://projects.forum.nokia.com/CartoonReader
-- Lucian
thank you Lucian
i will tell you one scenario
i have one Qt application in middle of that application it will access a webpage,after completion of the task (webpage task)it will automatically close,then it should come back to the Qt application.
means i need to know when the webpage is closed,thats why i asked how to close a webpage.
first of all
Is it possible?
please guide me
The example above shows a web page. When the user activates a close button the executed JavaScript passes a close command to the Qt side of the app. Exactly what you need. So yes, it is possible.
-- Lucian