Results 1 to 3 of 3

Thread: Qt+QWebKit+Java+Flash not working

  1. #1

    Default Qt+QWebKit+Java+Flash not working

    Hi all.
    I need to display Flash animation in my Qt application, and ability to control it programmaticaly. The only decision I found is - use QWebKit and control Flash through Java. I have sample html file that is parialy works on IE, Opera and Google Chroome(which is built on top of WebKit as I know). But when I'm loading this webpage in my Qt application - I see working flash animation. But non of scripts are working well.

    Here is script example:

    Qt Code:
    1. function getFlashMovieObject(movieName)
    2. {
    3. return document.getElementById(movieName);
    4. }
    5.  
    6. function PlayFlashMovie()
    7. {
    8. var flashMovie=getFlashMovieObject("myFlashMovie");
    9. if (flashMovie == null) alert("bad");
    10. else alert("good");
    11. //everything is ok until here
    12. flashMovie.Play();
    13. //never see this message
    14. alert("I'm here");
    15. }
    To copy to clipboard, switch view to plain text mode 

    The same situation with another scripts. In places where I try to access Flash object - java script is silently terminates.

    I posted this thread on this forum - because in browsers something seems to work (at least Platy/Pause ZoomIn/ZoomOut), but from Qt application nothing is working.

    Here is code from app:
    Qt Code:
    1. SlideViewWidget::SlideViewWidget(QWidget * parent) : QWebView(parent)
    2. {
    3.  
    4. page()->settings()->setAttribute(QWebSettings::JavascriptEnabled,true);
    5. page()->settings()->setAttribute(QWebSettings::PluginsEnabled,true);
    6. page()->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows,true);
    7.  
    8. loadFilm(QString("file://localhost/") + Resources::resourcePrefix + "test.swf");
    9.  
    10. }
    11. SlideViewWidget::~SlideViewWidget()
    12. {
    13. }
    14. void SlideViewWidget::loadFilm(const QString & fname)
    15. {
    16. QString html = Resources::flashPlayerBaseHtml;
    17. setHtml(html);
    18.  
    19. }
    To copy to clipboard, switch view to plain text mode 

    Realy need help. Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt+QWebKit+Java+Flash not working

    I've had similar problems with the client side database. I suggest that you register an issue in Qt Software's tasktracker - http://www.qtsoftware.com/developer/task-tracker .

  3. #3

    Default Re: Qt+QWebKit+Java+Flash not working

    I know that it would be a wonder, but may be there are another crossplatform ways to embed and control Flash window in Qt application?

Tags for this Thread

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.