Results 1 to 2 of 2

Thread: HyperLinks Embedded /wrapped on Flash Files not working - QT Webkit

  1. #1
    Join Date
    Dec 2012
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows Symbian S60

    Default HyperLinks Embedded /wrapped on Flash Files not working - QT Webkit

    Hi ,

    We are experiencing an issue while displaying SWF/Flash in our desktop application using QWebView. Flash file is displaying properly but when we click on any URL wrapped in flash file is not getting opened. Rest other flash functions are working fine including action scripting but links are not getting opened. When we click on any url/button it does nothing.


    QT Version: QT 4.7.4
    Platform: Windows 7 Professional, Service Pack 1, 32 bit OS

    Here is the description:

    Using QWebView::load(QUrl url), we are loading content of the Flash File. Until, we are loading non animated/non moving content, clicking on the QWebview takes us to the Handler for linkclicked(QUrl) and we can open up the URL using QDesktopServices:penUrl(url).

    To be able to show animated/moving content, we have to switch on the QWebSettings:: PluginsEnabled to ‘True’ for the QWebview.

    As soon as this setting is switched on to ‘TRUE’, the linkclicked(QUrl) handler is not getting called and hence no webpage is opened.

    Debugging the issue it was found that:

    When this setting is OFF, then the mouse click is handled by WebCore::HTMLAnchorElement::defaultEventHandler. The call finally lands in QWebPage::acceptNavigationRequest. In here, as we have also set
    webview->page()->setLinkDelegationPolicy(QWebPage:: DelegateExternalLinks, true) in our code, SIGNAL linkClicked is emitted.


    Code for QWebPage::acceptNavigationRequest is below for ready reckoner:

    bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
    {
    Q_UNUSED(frame)
    if (type == NavigationTypeLinkClicked) {
    switch (d->linkPolicy) {
    case DontDelegateLinks:
    return true;

    case DelegateExternalLinks:
    if (WebCore::SecurityOrigin::shouldTreatURLSchemeAsLo cal(request.url().scheme()))
    return true;
    emit linkClicked(request.url());
    return false;

    case DelegateAllLinks:
    emit linkClicked(request.url());
    return false;
    }
    }
    return true;
    }

    But in case QWebSettings:: PluginsEnabled is ‘True’ then the mouse click is handled by WebCore::HTMLPuginElement::defaultEventHandler. The call do finally lands up in QWebPage::acceptNavigationRequest, but SIGNAL linkClicked is not emitted, because the QWebPage::NavigationType type is set to ‘NavigationTypeOther’.


    Issue is QWebSettings:: PluginsEnabled, if we enable it to show animated flash files, then we user cannot CLICK and if we switch it OFF, then we cannot show Animated files.


    Your suggestions/workarounds are highly welcome.


    Thanks

  2. #2
    Join Date
    Dec 2012
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Windows Symbian S60

    Default Re: HyperLinks Embedded /wrapped on Flash Files not working - QT Webkit

    Guys, any solution?

    Really appreciate your support/guidance on this issue.

    Thanks

Similar Threads

  1. WebKit: how to force plugins (flash) to stop
    By rickyviking in forum Qt Programming
    Replies: 3
    Last Post: 10th September 2010, 15:31
  2. Flash support for QT Webkit 4.6
    By Peter Jerald in forum Qt Webkit
    Replies: 3
    Last Post: 9th July 2010, 08:40
  3. WebKit Flash Pulgin
    By TJSonic in forum Qt Programming
    Replies: 0
    Last Post: 22nd March 2010, 10:22
  4. Unable to display flash into webkit on MAC
    By jay in forum Qt Programming
    Replies: 2
    Last Post: 19th February 2010, 11:23
  5. Replies: 0
    Last Post: 19th March 2009, 13:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.