×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    172

    QML webview catch link clicked

    Hi,
    How to catch link clicked on QML webview


    Thanks
    Wael

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: QML webview catch link clicked

    whenever you click any link on the webview onLoadStarted will be called you can handle that signal to do whatever you want.

    Similarly onLoadFinished will also be called once the link is loaded completely on the webview.

  3. #3
    Regular Contributor
    Join Date
    Mar 2004
    Posts
    73

    Re: QML webview catch link clicked

    Sadly, not so. I've just checked it out. It fires when a page is loaded all right but it remains completely silent when a link is clicked (unless that link opens another page, of course). I'd also need to handle it in a situation when it doesn't load a page because there is no such page, I'd need to handle the link myself...

  4. #4
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    445

    Re: QML webview catch link clicked

    Any news on this? Placing a MouseArea inside the Webview does not work neither.

  5. #5
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: QML webview catch link clicked

    You can use a MouseArea on top of the WebView without problem.
    Mouse area by default consumes the mouse events, so you have explicitly set events accepted to false in the onPressed onReleased... mouse area slots if you want they go to the webview.

    BTW If using C++ is not a problem for you can use a your custom QNetworkAccessManager to know when a URL is clicked. For this you need a QDeclarativeNetworkAccessManagerFactory (take a look at http://www.developer.nokia.com/Commu...ManagerFactory).

    As gabba88 said in his previous comment, onLoadStarted should start when content starts to be loaded. If network access manager doesn't download anything. It's because there are domain resolution issues in your network.

Similar Threads

  1. QML With webview
    By waelfarouk in forum [Archived] Qt Quick
    Replies: 1
    Last Post: 2011-07-25, 05:25
  2. QML webview
    By ENEX in forum [Archived] Qt Quick
    Replies: 2
    Last Post: 2011-05-06, 06:35

Posting Permissions

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