Hi, im trying to play an mpeg file inside a QT app, but without success. I tried to use QAxWidget but simply creating a new object gave linking error, eventho i did include QtAxWidget.
I dont mind using other libs, if u have any idea let me know.
Hi, im trying to play an mpeg file inside a QT app, but without success. I tried to use QAxWidget but simply creating a new object gave linking error, eventho i did include QtAxWidget.
I dont mind using other libs, if u have any idea let me know.
To build Qt applications that can host COM objects and ActiveX controls link the application against the QAxContainer module by adding
to your application's .pro file.CONFIG += qaxcontainer
(ActiveQt is only part of the commercial version of Qt)
J-P Nurmi
lewis (18th July 2006)
Thx Ill try that.
I cant try it now cause Im working on it and it wont compile yet
I cant get anything to show up on the app...
QWidget *mainWidget = new QWidget();
QHBoxLayout *hbox = new QHBoxLayout();
mainWidget->setLayout(hbox);
QAxWidget *Video = new QAxWidget();
Video->setControl("ActiveMovieControl Object");
Video->dynamicCall("FileName","f1.mpg");
Video->dynamicCall("AllowHideControls",0);
Video->dynamicCall("AllowHideDisplay",0);
Video->dynamicCall("AllowChangeDisplayMode",0);
Video->dynamicCall("ShowTracker",1);
Video->dynamicCall("ShowControls",1);
Video->dynamicCall("ShowDisplay",1);
Video->dynamicCall("AutoStart",1);
Video->dynamicCall("PlayCount",1000);
Video->dynamicCall("EnableContextMenu",1);
Video->dynamicCall("EnablePositionControls",0);
Video->dynamicCall("EnableSelectionControls",0);
Video->dynamicCall("EnableTracker",1);
Video->dynamicCall("Volume",-600);
hbox->addWidget(Video);
setCentralWidget(mainWidget);
setWindowTitle("test");
I get the APP window with nothing inside it
Last edited by lewis; 18th July 2006 at 20:15.
Are you sure that this is correct name (especially that " Object" part)? Does setControl() return true?Originally Posted by lewis
hum, I thought i changed that, lemme check it up again...
indeed, I must have used an old version of the program in which that wasnt modified...
{6BF52A52-394A-11d3-B153-00C04F79FAA6}: that makes the window show... and more sense as well!
The video still doesnt play but I think ill recheck the program just in case its another dumb mistake like that... Ive made so many dumb mistakes today, i should go to bed.
If you look at the last post in my thread here http://www.qtcentre.org/forum/f-qt-p...ght=directshow you will see that I used DirectShow inside a QAxWidget and I can successfully play AVI and MPEG files. Hopefully this will help get you started as this is all basically Microsoft DirectShow code. You will have to download the DirectX SDK for some of their required libraries but if you want to use a QAxWidget, this is probably the best way to do it. Just search for DirectShow on this site and you will find numerous posts by me on this problem. Good luck and let me know if there is anything else I can try to help you with.![]()
Did that help at all?
not for now, there is way too much code there...didnt have time to go through...
All im trying to do is display a 5 seconds mpeg file in a QT app, so I just need the display part...
But if theres no simple solution ill just forget about it...
Bookmarks