PDA

View Full Version : Phonon::AudioOutput changes UI?



snah
12th August 2010, 21:57
Hi all,

when I added phonon to my project the style of the user interface has suddenly changed. And worse: all the text in the menu has disappeared.
I boiled the problem down to the following piece of code:


mediaObject = new Phonon::MediaObject(this);
audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
Phonon::createPath(mediaObject, audioOutput);

Specifically the second line where the AudioOutput is created. When I comment out this line the program behaves and looks normal (first image) but when the line is active the program looks like in the second image. It behaves normally however, it is just the appearance that has changed.
50685067

I have already found that the change happens at runtime (as opposed to during compilation) by enclosing the above piece of code in an if statement and using the debugger to chose between executing it or not.

Any ideas on how to solve this or how to troubleshoot this further?

If it helps, I'm running debian linux(lenny) and link to Qt 4.4.3 from the repositories.

snah
13th August 2010, 14:03
Did some more testing today and created a minimal example:
1: create a new Qt 4 Gui Application (with Phonon support)
2: create a simple menu in the form editor
3: in mainwindow.cpp:
-
#include <phonon/audiooutput.h>- and in the MainWindow constructor:
Phonon::AudioOutput(Phonon::MusicCategory, this);
I also tested on my laptop running windows xp professional and there the problem doesn't exist so I guess there is a problem with my installation.

As I said in my original post I installed Qt 4.4.3 from the lenny repositories
I have phonon 4.4.2 (also the latest in lenny repositories) and it's dev packages.

I also have Qt 4.6 compiled from source for a different project, but I explicitly set my project to use Qt 4.4.

snah
14th August 2010, 18:59
Sorry for the triple post, but I can't seem to edit my old posts after 24 hours or so.

Anyway I solved the problem (kind of). It turns out that the problem had to do with the Xine back-end I was using. I switched to GStreamer and now there are no more problems.

EDIT: spoke to soon, the problem still occurs, but only when I open a dialog window. Will be doing some more investigation right now....
suggestions on how to proceed debugging here are more then welcome since I'm kind of lost at the moment :(