PDA

View Full Version : Qt Integration



ToddAtWSU
11th January 2006, 17:36
I took a break from the video player I was trying to create with a frame-by-frame step feature. But I am back on that now and I have found a player that contains the frame-by-frame skipping. It is the playwnd program provided by Microsoft's DirectShow samples. What I would like to add to this sample are some buttons below the video player that would allow for the frame skipping, and possible a play/pause button and a stop button. These are already implemented through a menu system and keyboard shortcuts, but the buttons are a requirement. Is there anyway to use Qt to add these buttons to this already existing program? I know how to create buttons in the .ui file and I have experimented with them a little bit. But I do not know how I can add these to the already exisiting player. I am guessing that since this is a Microsoft sample, the code is implemented using MFC. I could be wrong, but this is just an assumption. Thank you for all your help and continued support to us Qt users!

axeljaeger
11th January 2006, 19:09
You can mix MFC and Qt, however this is neither nice nor portable. There are tools from Trolltech for migrating MFC-Apps with Qt but I think you'll have to buy them. You can get a handle for a QWidget using http://doc.trolltech.com/4.1/qwidget.html#winId and set up your directx context there. So the solution is to make a Qt-App and let directx render into a QWidget.

ToddAtWSU
23rd January 2006, 15:41
I have read through the documentation for QWidget, but I am confused as to how I can stick in DirectX code into the widget and get it to display my video. I have a GUI all built and have a QFrame set aside to put the video into, but I am confused with the integration. Maybe I am not understanding the documentation correctly. If you have some ideas as to where I could look for some examples or more help, that would be great. Thanks!

ToddAtWSU
23rd January 2006, 18:19
I know my DirectShow object is a COM object and I think I know how to integrate this into my Qt project. My problem is trying to find the ID number to create a DirectShow object in a QWidget or perhaps a QAxWidget. Does anybody have this ID for a DirectShow object so I can access the object through Qt? I have seen numerous CLSIDs for DirectShow, but have no idea which one if any may be correct. Thanks again!

wysota
23rd January 2006, 18:54
It should be in the documentation of the COM server (msdn.com probably)