Loading swfs in QAxWidget only full paths load
-
For example:
[code]
QAxWidget *flash = new QAxWidget(ui->widget);
flash->resize(740, 580);
flash->setControl(QString::fromUtf8("{d27cdb6e-ae6d-11cf-96b8-444553540000}"));
flash->dynamicCall("LoadMovie(long,string)", 0, QDir::currentPath()+"/file.swf");
[/code]
^ works[code]
QAxWidget *flash = new QAxWidget(ui->widget);
flash->resize(740, 580);
flash->setControl(QString::fromUtf8("{d27cdb6e-ae6d-11cf-96b8-444553540000}"));
flash->dynamicCall("LoadMovie(long,string)", 0, "file.swf");
[/code]
^ doesn't workI run the untitled1.exe from the same folder as the file.swf but the swf never loads.
Does it look somewhere else for file.swf other than the working directory? -
Not really Qt related, I'd say, but more a topic for a Flash forum, isn't it?
Qt/QAxWidget is just a container/proxy for the underlying native classes, the actual work is done by the latter.
-
It seemed like a Qt problem, any other time I've used the flash object in other languages it would check the working directory for the file.
If I posted this in a flash forum, they would tell me to post it in a Qt forum.
-
In this case I would suspect that the current environment (especially current directory) is not passed to the native control - for whatever reason.