Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Regular Contributor suneethapuchakayala's Avatar
    Join Date
    Dec 2009
    Posts
    77
    I need to handle the QWebpage close event in QWebview.How it will be possible,please explain with code.

  2. #2
    Regular Contributor suneethapuchakayala's Avatar
    Join Date
    Dec 2009
    Posts
    77
    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
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    What do you mean by closing a web page? You can close only application or window.

  4. #4
    Regular Contributor suneethapuchakayala's Avatar
    Join Date
    Dec 2009
    Posts
    77
    I wanna to close the window when the Webview doesnt have the webpage (if the webpage is automatically closed).

  5. #5
    Regular Contributor suneethapuchakayala's Avatar
    Join Date
    Dec 2009
    Posts
    77
    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

  7. #7
    Regular Contributor suneethapuchakayala's Avatar
    Join Date
    Dec 2009
    Posts
    77
    hi,

    I want to close the webpage .

  8. #8
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    Nice desire.

  9. #9
    Nokia Developer Moderator ltomuta's Avatar
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,335
    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?

  10. #10
    Regular Contributor suneethapuchakayala's Avatar
    Join Date
    Dec 2009
    Posts
    77
    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 suneethapuchakayala's Avatar
    Join Date
    Dec 2009
    Posts
    77
    is it possible?its requirement Daniil please advise me how to do.

  12. #12
    Nokia Developer Moderator ltomuta's Avatar
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,335
    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

  13. #13
    Regular Contributor suneethapuchakayala's Avatar
    Join Date
    Dec 2009
    Posts
    77
    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 ltomuta's Avatar
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,335
    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.

  15. #15
    Regular Contributor suneethapuchakayala's Avatar
    Join Date
    Dec 2009
    Posts
    77
    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.

Page 1 of 2 12 LastLast

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 Web Runtime
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved