Results 1 to 13 of 13

Thread: QT and Flash

  1. #1
    Join Date
    Aug 2008
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QT and Flash

    I need to show Flash movie in QT window.
    How it can be done? What QT widgets can be used for this?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QT and Flash

    There won't be a way to use Macromedia's Flash plugin with Qt4.4/Webkit, but hopefully with Qt4.5/Webkit.

    PS. QT is QuickTime. You probably mean Qt.
    J-P Nurmi

  3. #3
    Join Date
    Aug 2008
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT and Flash

    Ofcourse I meaned Qt. And my program is running under Linux.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT and Flash

    I think you can embed Gnash into your application.

  5. #5
    Join Date
    Aug 2008
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT and Flash

    Where documentation about gnash API and examples can be found.
    I tried to search at gnashdevelop.org and where is no documentation for programmers.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT and Flash

    Call gnash --help. You need to use the -x switch.

  7. #7
    Join Date
    Aug 2008
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT and Flash

    Qt Code:
    1. void myWindow::startFlash()
    2. {
    3.  
    4. QProcess *qpr=new QProcess;
    5. char temp[256]={'\0'};
    6. sprintf(temp,"-x %ld -j 200 -k 200 %s",this->winId(),"/home/vitaliy/projects/qtTest/qtTest/opr04CTZ.swf");
    7. qDebug(temp);
    8. QStringList list(temp);
    9.  
    10. qpr->start("gnash",list);
    11. }
    To copy to clipboard, switch view to plain text mode 

    I tried to this code for showing flash.
    But nothing is shown on my window. What I am doing wrong?

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QT and Flash

    Qt Code:
    1. args << "-x" << "%ld" << "-j" << "200" ...;
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  9. #9
    Join Date
    Aug 2008
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT and Flash

    I tried this but nothing changed.
    Now my code is this.

    Qt Code:
    1. void myWindow::startFlash()
    2. {
    3.  
    4. QProcess *qpr=new QProcess;
    5. char temp[256]={'\0'};
    6. sprintf(temp,"%ld",(long)this>winId());
    7. list << "-x" << temp<< "-j" << "500"<<"-k"<<"500"<<"/home/vitaliy/projects/qtTest/qtTest/opr04CTZ.swf";
    8. qpr->start("gnash",list);
    9. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by jacek; 29th August 2008 at 23:51. Reason: changed [qtclass] to [code]

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT and Flash

    Does gnash start at all? Can you see it on the process list?

  11. #11
    Join Date
    Aug 2008
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT and Flash

    Yes I can see GTK-gnash in the process list.

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT and Flash

    Does it have proper arguments?

  13. #13
    Join Date
    Aug 2008
    Posts
    28
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT and Flash

    I found the solution insteed of gnash, the kde-gnash must be used.

Similar Threads

  1. Question about QWebView & Flash
    By JimDaniel in forum Qt Programming
    Replies: 2
    Last Post: 22nd June 2008, 19:10
  2. Running flash .swf files in widget?
    By ashukla in forum Qt Programming
    Replies: 37
    Last Post: 12th February 2008, 05:14
  3. Embedding Flash in Qt4 app,On Mac OS X
    By larntin in forum Qt Programming
    Replies: 0
    Last Post: 21st June 2007, 11:12
  4. Qt vs Flash
    By Scorp1us in forum Newbie
    Replies: 10
    Last Post: 16th May 2007, 01:26
  5. Flash with QT
    By Kapil in forum Qt Programming
    Replies: 1
    Last Post: 6th March 2006, 10:14

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.