Well, I thought I'd give linux gamedev a try, so after careful consideration I thought why not use Qt, it's cross-platform enough and there seems to be a reasonable amount of documentation, plus you can totally style your app with CSS, how awesome is that, not that it would actually matter, because I use OpenGL but still.
Now the problem is that Qt has a internal main loop for its applications and being thought for event driven programming I had some problems with making the game realtime.
Problem #1: It won't update :(
There is no repaint scheduled, by default, QGLWidget just paints the window the first time and then maybe if you resize the window, I basically had two solutions, either set a timer and onTimeout call paint, or schedule a repaint right after the last one is over. I went for the last option because I had no way of knowing the reliability of the timer event on different machines/situations, this is easily solved by overriding the paintEvent method
Solution: Override the paintEvent method and call update inside it, just be sure to construct a QGLWdiget::paintEvent before to be sure that the parent gets the message as well
Problem #2: It's not realtime
Well this is not actually related to Qt, but to gcc and linux. Because I thought it would be easier for me this way, I just ported an older project of mine that I made under windows. Thing is I used clock to make sure animations are independent from the framerate. Problem is that under gcc 4.4.4 at least, the clock function returns the number of milliseconds rounded to seconds for some reason, so it was out of the question.
After a quick search on the internet I found the gettimeofday function which isn't actually cross-platform , but on the other hand gives microsecond precision (I was little bit skeptical at first, but in a empty console application it seems to actually give values below a millisecond).
Solution: Don't use clock, use gettimeofday instead
And that's it for today maybe I'll post some more if I run into more trouble.