Take the 2-minute tour ×

So to give a little context, my goal here is to produce a binary which will run my Python/PyQt4 application on any recent linux (but mainly ubuntu), without requiring the user to install the pyqt4 or pyqwt5 library. (If anyone can give a better way to do that than my method below, that would be great also :)

I've got this mostly working with bbfreeze by installing an ubuntu 8.04 virtual machine (the resulting code from bbfreeze will not run on a system with an older glibc installation), compiling the latest versions of qt, pyqt etc on this vm and freezing the application on that.

On ubuntu 8.04, when running my application it uses a very old-looking style, where on ubuntu 10.04 it looks much nicer.

That in itself isn't an issue, but the problem is that when I run the bbfreezed code from ubuntu 8.04 on ubuntu 10.04, the program has the same UI style as when running on 8.04, which looks really bad on 10.04.

So I'm wondering, how do I make sure that my frozen code will look good on all platforms? I think that bbfreeze must be only including the ui style used on 8.04 rather than all of them, but I'm not sure how to resolve this.

Hopefully this is clear enough!

share|improve this question
I'm entirely unsure about what exactly could be the problem, but usually if styles in GTK applications (Qt can use GTK on Linux) show up wrong, it's because either the application is ignoring the configuration (because it's running as another user) or the versions of the GTK libraries are different from those installed on the system. Maybe this helps. Otherwise, you may set a default application style using doc.qt.nokia.com/4.6/qapplication.html#setStyle-2 . –  Ivo Sep 14 '10 at 8:17
Thanks, that will be helpful for comparing the styles used in different situations - going to have more of a try to investigate this tonight. –  Jords Sep 15 '10 at 2:56

1 Answer 1

up vote 0 down vote accepted

I found the solution (I think, still recompiling qt) - I just didn't have the QGtkStyle installed on my ubuntu 8.04, since even if you pass the -gtkstyle option qt's configure will silently not compile it if you don't have the correct gtk+ dev libraries installed.

I'm also using pyinstaller rather than bbfreeze now,but this would have affected both equally.

share|improve this answer

Your Answer


