PDA

View Full Version : QT and Flash



sawerset
28th August 2008, 19:14
I need to show Flash movie in QT window.
How it can be done? What QT widgets can be used for this?

jpn
28th August 2008, 19:21
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.

sawerset
28th August 2008, 19:24
Ofcourse I meaned Qt. And my program is running under Linux.

wysota
28th August 2008, 19:50
I think you can embed Gnash into your application.

sawerset
29th August 2008, 10:41
Where documentation about gnash API and examples can be found.
I tried to search at gnashdevelop.org and where is no documentation for programmers.

wysota
29th August 2008, 10:46
Call gnash --help. You need to use the -x switch.

sawerset
29th August 2008, 19:43
void myWindow::startFlash()
{

QProcess *qpr=new QProcess;
char temp[256]={'\0'};
sprintf(temp,"-x %ld -j 200 -k 200 %s",this->winId(),"/home/vitaliy/projects/qtTest/qtTest/opr04CTZ.swf");
qDebug(temp);
QStringList list(temp);

qpr->start("gnash",list);
}


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

jpn
29th August 2008, 19:50
QStringList args;
args << "-x" << "%ld" << "-j" << "200" ...;

sawerset
29th August 2008, 21:59
I tried this but nothing changed.
Now my code is this.




void myWindow::startFlash()
{

QProcess *qpr=new QProcess;
char temp[256]={'\0'};
sprintf(temp,"%ld",(long)this>winId());
QStringList list;
list << "-x" << temp<< "-j" << "500"<<"-k"<<"500"<<"/home/vitaliy/projects/qtTest/qtTest/opr04CTZ.swf";
qpr->start("gnash",list);
}

wysota
30th August 2008, 13:33
Does gnash start at all? Can you see it on the process list?

sawerset
31st August 2008, 06:22
Yes I can see GTK-gnash in the process list.

wysota
31st August 2008, 16:52
Does it have proper arguments?

sawerset
1st September 2008, 07:51
I found the solution insteed of gnash, the kde-gnash must be used.