Wednesday, August 19, 2009

QML fun...

[Once or twice a year, this blogs wakes up... Quite strange, isn't it ?]

Did you see the nice QML demonstrations (Qt 4.6, kinetic...) from the trolls ? These demonstrations are so amazing that I'm already using QML in a project I'm asked for my school... But for this project, I have to be able to display videos, and so far there is no video item in QML.

So here you'll find a really really basic C++ class to implement a QML video item :
- cpp file :
- h file :

These files have no licence header, no documentation of any kind, no comment, no stability test... nothing. It's just some code that may be useful. It contains weirdiness, for sure... But still it is working...

EDIT : The files are under LGPL, copyright me... Is it enough for everybody to use it ? I must admit I seldomly care about such licensing stuff, as long as it's free...

Usage :
- Include the files in your project
- In your QML file, put the following code for instance :
Video {
id: "sth"
source: "/home/moi/test.ogg"
width: 320
height: 180

And that's all for now...