×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    QWebpage close event.

    I need to handle the QWebpage close event in QWebview.How it will be possible,please explain with code.

  2. #2
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    how to close a webpage

    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?

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: how to close a webpage

    What do you mean by closing a web page? You can close only application or window.

  4. #4
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    Re: how to close a webpage

    I wanna to close the window when the Webview doesnt have the webpage (if the webpage is automatically closed).

  5. #5
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    Re: how to close a webpage

    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

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326
    Last edited by divanov; 2011-03-14 at 12:26.

  7. #7
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    Re: how to close a webpage

    hi,

    I want to close the webpage .

  8. #8
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QWebpage close event.

    Nice desire.

  9. #9
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: how to close a webpage

    Quote Originally Posted by suneethapuchakayala View Post
    I wanna to close the window when the Webview doesnt have the webpage (if the webpage is automatically closed).
    Do you want to allow your application/view to be closed by JavaScript code running within the web page context?
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  10. #10
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    Re: how to close a webpage

    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

  11. #11
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    Re: QWebpage close event.

    is it possible?its requirement Daniil please advise me how to do.

  12. #12
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: QWebpage close event.

    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

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  13. #13
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    Re: QWebpage close event.

    Quote Originally Posted by ltomuta View Post
    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
    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

  14. #14
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: QWebpage close event.

    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

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  15. #15
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    77

    Re: QWebpage close event.

    Quote Originally Posted by ltomuta View Post
    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.
    Thank you very much

    I will try for that , any suggestions regarding code ........ if possible.
    Last edited by suneethapuchakayala; 2011-03-15 at 10:51.

Similar Threads

  1. having QWebView / QWebPage remember credentials?
    By emmanuel.touzery in forum Qt
    Replies: 2
    Last Post: 2011-02-02, 12:59
  2. how to seize the event of close?
    By crystal azalea in forum Symbian
    Replies: 1
    Last Post: 2010-04-26, 15:49
  3. Replies: 2
    Last Post: 2008-04-23, 07:11
  4. Flip close event
    By chrisz@symsys-it.com in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-07-19, 23:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×