Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Qt\QtQuick Tutorial

tiagocc0

Arcane
Joined
Jun 29, 2007
Messages
2,056
Location
Brazil
What will this cover: How to do a simple Qt application using QML (from QtQuick component)

Why: Qt uses C++, but if you work with QML you can do all the logic in Javascript, so for those that don't want to learn C++, this might be a easy way to make a simple game and yet have the possibility to work with C++ or C++ libraries if wanted. Oh yeah, you can use Qt on Windows, Linux or Mac OS X.

Prerequisites: Qt 4.8 is a nice start, don't download the online installer, it's shit, download the Qt Library and Qt Creator (IDE) and you have everything you will ever need.
http://releases.qt-project.org/qt4/source/qt-win-opensource-4.8.2-mingw.exe
http://get.qt.nokia.com/qtcreator/qt-creator-win-opensource-2.5.0.exe

This version uses MinGW, there are versions for you to work with Visual Studio, but I've never tried.

About QML: Although QML looks simple you can do very complex code with it, I will start with basic things and then move to more sophisticated applications. Keep in mind that I'm still learning it myself and I'm a lazy bum.
Also, QtQuick was developed to be able to build UIs.

First application: Let's make the QML Viewer, it's in C++, but after this is done you can make everything else in QML and just forget C++.


(I will continue later, wait for the next chapter of our soap opera, for now just download the damn thing and install it if you're interested)


UPDATE 1
Okay, let's open Qt Creator.

tut01_1.png

Click on 'Create Project'.

tut01_2.png

Choose 'Qt Console Application'. That's the less bloated one, we will modify it to our needs anyway.

tut01_3.png

Choose a folder in 'Create in:', the folder must exist so Qt won't create it for you.
What you put in 'Name:' is actually the folder that Qt creates for your project.


tut01_4.png

Here choose 'Shadow build' so all the garbage the IDE creates goes to a folder other than your source code, define the folder and if it's release or debug. I will be using release.

tut01_5.png

Just click 'Finish' and voila!

tut01_6.png

It should look now something like this, minus the divided code window, I divided it to show all the code that was generated by the IDE. You can divide the screen clicking on the buttons where there's a green circle.

You can see that our project has two files, a '.pro' that defines the project and a '.cpp' that is our main file.

First, let's remove the line 'QT += console' because we want a GUI application and change the minus for a plus on the line 'QT -= gui'. You can remove the 'CONFIG' lines too.
Since this isn't a console application also change from 'QCoreApplication' to 'QApplication'.
Also change the '#include' to a more generic one so we can use all the GUI module. Put '#include <QtGui>'.
And we can already show something on screen so I will add a 'QWidget' to it.

One last thing to do is to not show the actual console window.
Go to 'Projects', 'Run Settings' and deselect 'Run in terminal'.
tut01_7.png


So it should look like this after tidying it up.
tut01_8.png

I've added the 'QWidget' and then 'showed' it. We usually don't need to show objects but since this is main object of our application we need to do it once.

'QApplication' is the backbone of your application, without it Qt objects won't work.
Now you can compile it clicking on the 'Run' button you can see above.
You will see a blank window. Next I will show you how to add the QML object so we can start coding in QML.

Check out these links if you want to know more about how Qt works:
http://qt-project.org/doc/qt-4.8/
http://qt-project.org/wiki/QtWhitepaper
http://qt-project.org/doc/qt-4.8/signalsandslots.html
This last one is very interesting, it's one way to communicate between C++ and QML
(End of UPDATE 1)



UPDATE 2
Okay, remember I made the project at 'C:\Codex\Example01' and the 'Shadow Copy' pointed to 'C:\Codex\Build'?
If you did the same thing I did the binary (.exe) is going to end up here:
'C:\Codex\Build\Example01\Release\Example01.exe'

We are going to change that, so let's create some directories!
tut02_1.png

I made a 'bin' folder inside 'C:\Codex\Example01', and inside it a 'QML' folder.
So the executable and DLLs are going inside BIN and the qml code inside QML.

Now let's add our main qml file.
tut02_2.png

Right click on your project and select 'Add New...'.

tut02_3.png

Choose 'Qt' and 'QML File'.

tut02_4.png

Let's call it 'main.qml' and put it at 'C:\Codex\Example01\bin\QML'.

tut02_5.png

Now let's fix the 'Working directory' so we find the qml file.
Click on 'Projects' then 'Run Settings' and change it to your bin folder: 'C:\Codex\Example01\bin'.
Now we need to fix where your binary goes when compiled. We will do it on the code.


tut02_6.png

At the 'Example01.pro' let's change the 'TARGET' to this 'TARGET = ../../../Example01/bin/Example01'.
Remember the binary was being compiled to 'C:\Codex\Build\Example01\Release\Example01.exe'?
So one '..' to exit the 'Release' foder, one to exit the 'Example01' folder, another to exit the 'Build' folder and then we go to the 'Example01/bin/' folder and the last piece is the name of binary.

The 'OTHER_FILES' should have been added automatically when you added the 'main.qml' file.
And finally add the modules declarative and opengl (if you want) to the 'QT' line: 'QT += gui declarative opengl'.

Now let's make the qml viewer.
QDeclarativeView *window = new QDeclarativeView();

Now we need the viewport object, if you want opengl use QGLWidget, if not use a commom QWidget instead.
QGLWidget *viewport = new QGLWidget();

To use it on qml let's disable the autofillbackground option, the QDeclarativeView will do it instead.
viewport->setAutoFillBackground(false);

Now we load the source file that should be in the QML folder, then we put the viewport into the view and show it.
window->setSource(QUrl::fromLocalFile(".\\QML\\main.qml"));
window->setViewport(viewport);
window->show();

The windows is resizable so if you want you can set a fixed, minimum or maximum size like this:
window->setFixedSize(800,600);
window->setMaximumSize(800,600);
window->setMinimumSize(800,600);

Finally we can go to the qml file.
The first object you make is important because it will be your canvas, let's make a 800x600 orange window.
Rectangle
{
width: 800
height: 600
color:"orange"
}

Now compile it and check if you see this window.
tut02_7.png


Okay, further reading:
http://qt-project.org/doc/qt-4.8/qdeclarativeelements.html
http://qt-project.org/doc/qt-4.8/qdeclarativeexamples.html

If you want to make a hello world add this inside the Rectangle object:
Text
{
text:"HelloWorld"
anchors.centerIn: parent
}

EDIT: Forgot to add the files if you are too lazy to type:
http://purpleorangegames.com/tutorial/Example01_UPDATE2.7z

(End of UPDATE 2)




Second application: Now let's make a menu for our imaginary game.

UPDATE 3

Let's start making a rectangle to our screen, it will be the base of our button.
tut03_1.png


If we compile we will see it like this, so we have 'x' and 'y' and they are relative to the parent object, then 'height' and 'width' that are in pixels and the 'color' property can be defined like you would in html\css.
Example: ""white"", ""#fff"", ""#ffffff"" or using qt commands like "Qt.rgba(1, 1, 1, 1)"
You can also use "Qt.hsla()", "Qt.darker()", "Qt.lighter()" or "Qt.tint()"
More info here: http://doc.qt.nokia.com/4.7-snapshot/qml-qt.html
tut03_2.png


Let's try making the rectangle clickable. Add "MouseArea", the "anchors.fill: parent" means it will have the same dimension as it's parent object. The "radius" property will smooth the rectangle's borders.
The "onClicked" event then changes the "parent.color".
tut03_3.png


As you can see I've clicked on the 'button'.
tut03_4.png



Now we can try hovering the mouse over the button to change it's color.
First we need to enable hovering it by using the command "hoverEnabled: true" inside the "MouseArea".
tut03_5.png


The problem with the solution above is that it's changing the color property of the button but sometimes you don't want to directly change it. We can for example make a complex if statement directly on the property and if we do and then force to change it's value, the if statement will be lost.
So let's define our first property, it's boolean and it's named "hover", let's set it to "false".
Then we make the if statement on the color property. If hover is true then change to orange, if hover is not true then change it to white.
And inside the "MouseArea" we then change the "hover" property.
The beauty of it is that Qt will take care of it automatically from now on, whenever the hover property changes, the application gets updated. No need to make functions or connect signals.
tut03_6.png


You can note from the code above that I also made another rectangle.
I've set it's property "anchors.right" to "parent.right" so it will glue to the right side of our screen.
On our button I've erased the "x" property and set "anchors.horizontalCenter" to "parent.horizontalCenter", so whatever the first Rectangle width size is, the button will always remain at the center.
tut03_7.png


Let's now make use of other qml files. In qml it's advised to not make a single file with all the code, instead you should use several files each containing modules of your code as to improve performance and code quality.
This means that we can get part of our code, define it on another file and then use it on another qml file the same way you would declare a class and then create objects based on it.
Let's create a MouseOver qml file so whenever we need hovering, we can have it without having to code it again.
tut03_8.png


And here it is, now let's edit it. Copy our "MouseArea" code to it.
tut03_9.png


And instead of using "MouseArea" on our main code, let's use "MouseOver" instead.
You can compile it and check that it still acts the same as the previous code, but whenever you need hovering you can declare "MouseOver" instead of "MouseArea".
tut03_10.png


Put some text inside your button. When you want to change the size of the text you can use "font.pixelSize" or "font.pointSize".
You can read more about it here: http://doc.qt.nokia.com/4.7-snapshot/qml-text.html
See how we make it centered using "anchors.centerIn: parent".
tut03_11.png


We can try to export our button to another qml file too, let's make it more generic and add a string property.
So this way we export it we can access the text property of the rectangle that we just made and it will automatically update the text property of the text object inside the rectangle.
tut03_12.png


And so Button.qml is born.
tut03_13.png


Now check it how our main code got better.
All the properties of the qml file are like default properties that we can override.
So if we want we can set another "height" or "color" if we want on out main code.
tut03_14.png


I think you're ready to make several buttons for our game menu.
But instead of just repeating "Button" several times, let's make a list of buttons.
We have 3 parts that we need to pay attention here, the first part is the List, I'm going to use a "Repeater", it's a simple list that always shows it's elements, you can use a "ListView" too, this one allows you to move the list with the mouse or keyboard and hide items that are offscreen.
The second part of the list is the data, we define it on a "ListModel" but it can come from several sources like a QStringList from C++ or actual Models from C++ or even XML files.
The third part of the list is how you are going to show it on the screen. First you have to declare a "Component", whatever is inside of the component does not get shown on screen, instead it acts like declaring a class that you haven't created an object yet. We call it a delegate, the "Component" only allows one object inside it, but you can have N objects inside this one object. Let's create the delegate and put our button inside it.
On our "ListModel" we made several items and declared two properties for them, "varText" and "varY" sp we have to use these names on our delegate.
Then in the "Repeater" we just point our model and our delegate.

tut03_15.png



And voila!

tut03_16.png


Now we can create a javascript function to know which button was clicked.
It will receive a variable called "buttonName" and the function will be called "menuButtonClicked".
See that I put a "console.log()" command there? This sends a text to Qt Creator so you can check which button you're clicking.

tut03_17.png


Add the "onClicked" event so that the button sends it's name to the "menuButtonClicked" function.

tut03_18.png


To make our game menu prettier I'm going to add an image, so I made a "Images" dir inside the "QML" dir and put a "logo.png" there.

tut03_19.png


And let's go back to the C++ code to add one line so that it knows when we want to quit the game.
We are connecting the view engine quit signal to out main application quit function (slot).

tut03_20.png


Let's edit the function so that when we click on a button and the button's name is "Quit" it calls "Qt.quit()" signal.
While at it let's add the image, here I didn't need to change it's coordinates but you may need to tweak it a little so it will fit correctly on your window. I've also changed some of the colors.

tut03_21.png


And here's our first game menu made in QML. The Quit button works, you can hover all the buttons and make buttons if you want adding just a line.

tut03_22.png


If I've written something dumb please say so I can fix it. Thanks for reading it all up.
Next we will take a look at animations.


(End of UPDATE 3)
 

J1M

Arcane
Joined
May 14, 2008
Messages
14,606
I have found that Qt's way of combining QML/C++ under the guise of making things "easier" results in anything but. Ditto with the claims of "segregating the UI from the business logic". Naming objects and then registering them is functionally the same as declaring a bunch of global variables.

I'm sure the Qt framework itself has some merit, but I wouldn't touch QML. It's not something that you can easily debug, and if you are trying to do anything moderately interesting you will constantly be swapping back to C++ and exposing things to QML with Q_MACROs.
 

tiagocc0

Arcane
Joined
Jun 29, 2007
Messages
2,056
Location
Brazil
I'm on board... proceed good sir.
Welcome aboard mate.


I have found that Qt's way of combining QML/C++ under the guise of making things "easier" results in anything but. Ditto with the claims of "segregating the UI from the business logic". Naming objects and then registering them is functionally the same as declaring a bunch of global variables.

I'm sure the Qt framework itself has some merit, but I wouldn't touch QML. It's not something that you can easily debug, and if you are trying to do anything moderately interesting you will constantly be swapping back to C++ and exposing things to QML with Q_MACROs.


Not exactly, you can make a custom list that automatically updates it's variables to the QML.
I use this in my game, I made a custom item that represents a ship, then a custom item that represents a component and a custom item that represents an ability.
All items use the same list so the game has a list of ships for player 1 and one for player 2.
Each ship then has a list of it's own which contains several components.
Each component then has a list of it's own which contains several abilities.
And everything is exposed to the QML automatically.


Qt uses signals and slots, if you expose an object to the QML then all slots are automatically usable within QML.
If you use signals and slots then it's basically the same as using just Qt.
You have many more ways to communicate C++ and QML.


The thing is if you want something simple you don't need C++ at all.
But you can still use it later if you want.
 

Hirato

Purse-Owner
Patron
Joined
Oct 16, 2010
Messages
3,930
Location
Australia
Codex 2012 Codex USB, 2014 Shadorwun: Hong Kong
Added UPDATE 2 to the first post.:hero:

Just for that I'm going to have to brofist your initial post as opposed to that one
:rpgcodex:



First things first: Yatta! It works. I never realised using QML was this easy!
Kind of funny that I never really learned how to use Qt, despite being a fanboy for its use and propogation :lol:

QtCreator1.jpg



Secondly, I can't help but notice our IDEs look somewhat different, colour schemes aside.
The 'Projects' tab has some rather notable stylistic differences (as can be seen below).
I take it you're not using QtCreator 2.5.0, like the rest of us?

QtCreator.jpg
 

tiagocc0

Arcane
Joined
Jun 29, 2007
Messages
2,056
Location
Brazil
First things first: Yatta! It works. I never realised using QML was this easy!
Kind of funny that I never really learned how to use Qt, despite being a fanboy for its use and propogation :lol:

Yeah, it's really simple, it's a shame that Qt itself has lots of examples and all of then are too bloated with useless code making it difficult for the developer to realize what's really needed for it to work.


Secondly, I can't help but notice our IDEs look somewhat different, colour schemes aside.
The 'Projects' tab has some rather notable stylistic differences (as can be seen below).
I take it you're not using QtCreator 2.5.0, like the rest of us?
It's 2.5.0, are you on windows?
I had an older version installed so it may be using my old configuration.
 

Hirato

Purse-Owner
Patron
Joined
Oct 16, 2010
Messages
3,930
Location
Australia
Codex 2012 Codex USB, 2014 Shadorwun: Hong Kong
It's 2.5.0, are you on windows?
I had an older version installed so it may be using my old configuration.

I'm on Linux, as can be seen by the KWin Window decorators and the file separators being forward slashes.
I have Qt 4.8.2 installed along with QtCreator 2.5.0.

I rather doubt that the interface for the 'Projects' tab will be saved to a configuration file (other than Project.pro of course)
It can't hurt to check anyway (Help --> About QtCreator), not that it will matter in the long run, regardless.
 

tiagocc0

Arcane
Joined
Jun 29, 2007
Messages
2,056
Location
Brazil
I'm on Linux, as can be seen by the KWin Window decorators and the file separators being forward slashes.
I have Qt 4.8.2 installed along with QtCreator 2.5.0.

I rather doubt that the interface for the 'Projects' tab will be saved to a configuration file (other than Project.pro of course)
It can't hurt to check anyway (Help --> About QtCreator), not that it will matter in the long run, regardless.

I think it's saved on the registry.
about.png


EDIT: Did you install the whole SDK or just the library and the creator?
 

Burning Bridges

Enviado de meu SM-G3502T usando Tapatalk
Joined
Apr 21, 2006
Messages
27,561
Location
Tampon Bay
I'm interested in qt, it seems to be the most professional option for 2D. And the license is fair.

But I'm also not going to use something like QML. It's bet it's nigh impossible to do anything dynamically, and with problems of its own that you don't fully understand I don't think it's less work than declaring everything by hand - while you have full control that way. I believe that things like QML are only there so people who cannot program can still contribute to team efforts.

What do you use for debugging? When I tested Qt Creator, it was really weird. Probably I need to learn how it can be configured.

Also, what do you use for sound? I barely got my hands on qt but QSound is too primitive. I thought about using audiere instead, which works quite well.

Finally, how do you configure deployment? I ended up manually copying all dlls into the release folder, but that's definitely not the right way to do it.
 

Burning Bridges

Enviado de meu SM-G3502T usando Tapatalk
Joined
Apr 21, 2006
Messages
27,561
Location
Tampon Bay
This may be dumb question, but are there any generics in qt? Otherwise I have to include STL as well, because I use lazy loading a lot.
 

tiagocc0

Arcane
Joined
Jun 29, 2007
Messages
2,056
Location
Brazil
I'm interested in qt, it seems to be the most professional option for 2D. And the license is fair.

But I'm also not going to use something like QML. It's bet it's nigh impossible to do anything dynamically, and with problems of its own that you don't fully understand I don't think it's less work than declaring everything by hand - while you have full control that way. I believe that things like QML are only there so people who cannot program can still contribute to team efforts.

What do you use for debugging? When I tested Qt Creator, it was really weird. Probably I need to learn how it can be configured.

Also, what do you use for sound? I barely got my hands on qt but QSound is too primitive. I thought about using audiere instead, which works quite well.

What do you want to do dynamically with it? I think you have checked already but if not have look at my game, it's all QML for the UI. QML was made for UI and you can achieve the same result using the canvas already provided by Qt, but in QML it's a lot easier and you use less code than using the canvas. It's not as feature rich yet in some areas.

One thing that worries me is that animation is too automatically, it's easier to work with but difficult to try to control every frame. I have yet to find a way to control it better.

I'm not worrying about debugging yet, my project is quite small and most bugs I have found were easy to squash with some simple warnings to find where it was.

Qt has a module called QtMultimedia that does the work but I haven't tried to add sounds and music yet to the game, I just did a quick test to check if it was possible and then I removed the code.
http://labs.qt.nokia.com/2010/05/10/low-level-audio-processing-with-qtmultimedia/
You can work with Phonon too:
http://doc.qt.nokia.com/4.7-snapshot/phonon-qmusicplayer.html

While I understand you wouldn't want to use QML for a complex game, you can still use QML for some small things.
I've demonstrated how to make a viewer, you can embed this viewer anywhere in your Qt program or have several viewers working at the same time. So you can make minimal QMLs to suit your needs at the time and then destroy then and not worry about it getting too complex to debug.


This may be dumb question, but are there any generics in qt? Otherwise I have to include STL as well, because I use lazy loading a lot.

As far as I know there aren't. But I don't know much about them too.
 

Burning Bridges

Enviado de meu SM-G3502T usando Tapatalk
Joined
Apr 21, 2006
Messages
27,561
Location
Tampon Bay
So this is going to be a commercial game? If not, will you release some source code? It would be interesting to see how to set up such a basic game.

Didn't get anywhere with QtMultimedia either. Anyway I included audiere instead, it works right away, cross platform compatibility is not so much my concern right now.
 

tiagocc0

Arcane
Joined
Jun 29, 2007
Messages
2,056
Location
Brazil
So this is going to be a commercial game? If not, will you release some source code? It would be interesting to see how to set up such a basic game.

Didn't get anywhere with QtMultimedia either. Anyway I included audiere instead, it works right away, cross platform compatibility is not so much my concern right now.

It's going to be commercial but the source code will be available. The images/movies/sounds/music/data you will get only if you buy the game.
Qt 5 is about to be released, maybe it will have a better solution for audio.
 

Burning Bridges

Enviado de meu SM-G3502T usando Tapatalk
Joined
Apr 21, 2006
Messages
27,561
Location
Tampon Bay
As I said, Audiere works quite well now. I had thought it would be more hassle to link it than it was.
I just have to work a bit to release memory, and store positions, if I need it.

Another question. I already know out how to run in fullscreen, but is there also a way to set resolution (not window size)?
That's perhaps a bit counterintuitive, and it's actually ok with me if the program defaults to desktop resolution. I just thought some people would want to set a different resolution.

P.S. You didn't say anything to my deployment question. Presuming I just copy them, how can I find out which dlls I have to distribute?
 

DakaSha

Arcane
Joined
Dec 4, 2010
Messages
4,792
I'd look into Qt if just to ease my way into C++ if it could build for iOS. I don't know if it's even feasible but if it ever does get iOS support please let me know (as im sure to forget about it)
 

tiagocc0

Arcane
Joined
Jun 29, 2007
Messages
2,056
Location
Brazil
As I said, Audiere works quite well now. I had thought it would be more hassle to link it than it was.
I just have to work a bit to free the memory, and store positions, if I need it.

Another question. I already know out how to run in fullscreen, but is there also a way to set resolution (not window size)?
That's perhaps a bit counterintuitive, and it's actually ok with me if the program defaults to desktop resolution. I just thought some people would want to set a different resolution.

P.S. You didn't say anything to my deployment question. Presuming I just copy them, how can I find out which dlls I have to distribute?


I will take a look at Audiere, it may suit my needs too.

It seems you need to use windows api to change resolution.
From my tests the showFullScreen was working and changing my resolution, but then later it stopped changing it.
I think it does try to change resolution but at any obstacle it falls back so the windows api would be the only reliable way to do it.

Sorry, I missed that line about deployment, there are applications that check what dlls the executable is trying to find.
But I usually do it the old way, I have a clean windows 2000 virtual machine, so I copy my game there and try to execute it.
It will say which dll it's trying to find so I copy one by one to make sure I'm not putting files that shouldn't be there. (I should make a XP and W7 VM for these kinds of tests too)
And if the game works on a W2000 VM then I safely assume that it will run on most windows.
EDIT: It seems Qt does have a way to automatically deploy, but I never used it.


I'd look into Qt if just to ease my way into C++ if it could build for iOS. I don't know if it's even feasible but if it ever does get iOS support please let me know (as im sure to forget about it)


There is several groups that are trying to make Qt compatible with iOS, I read just the other day that one of them was able to make one of their applications to be approved by Apple.
I think this is the website but I'm not that sure now.
http://mediator-software.com/

And their twitter: https://twitter.com/#!/Qt4iOS

And there's this one crazy guy that is porting to android:
http://labs.qt.nokia.com/2011/02/28/necessitas/
"BogDan did not only create a Qt port, but also a complete Qt Creator integration for Android, as well as an all-in-one Necessitas installer. And as cherry on top, BogDan implemented Ministro, a deployment service which makes sure that the right Qt libraries are present on the end users’ device and your application does just run.
He did all of that in his spare time, driven by his passion for Qt, Android and FOSS. He does neither work for Nokia nor for Google. This is a pure community effort."
 

Burning Bridges

Enviado de meu SM-G3502T usando Tapatalk
Joined
Apr 21, 2006
Messages
27,561
Location
Tampon Bay
Did you have any success with QtMultimediaKit? I was looking for a way to use basic video playback, but did not manage to include QMediaPlayer and QVideoWidget. It seems a lot of people have the same problems - some stuff seems to be missing from the 4.7 SDK.

Anyway, so far I really like it, and will probably use this for stuff that has nothing to do with gaming. So far this is the most trouble free experience I had with any UI widgets library in CPP. The capabilities of the QGLWidget plus pathstroke are glorious.

Also, we really should find out how to use the debugger. You wont get very far with your games without it.
 

tiagocc0

Arcane
Joined
Jun 29, 2007
Messages
2,056
Location
Brazil

Burning Bridges

Enviado de meu SM-G3502T usando Tapatalk
Joined
Apr 21, 2006
Messages
27,561
Location
Tampon Bay
It seems that for video playback the QtMultimedia can only play simple animations, like a gif. You would have to use Phonon for video.

Hm, from what I understand it should play mp4 and other video formats, too. So far I decided to wait for Qt5 to try video playback again.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom