You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, June 20th 2010, 2:36pm

png does not show up when compiling with gcc 4.5.0, but does when compiled with 4.4.1

Hi folks,

I have a strange problem when loading a .png image to a QPixmap.

Source code

1
QPixmap background_pixmap = QPixmap("sample.png");


In fact, it might not even be related to the png or the map itself, but rather to some qt environment setting.
Here are the symptoms:

When I use the gcc 4.4.1 compiler that came with my Linux distribution along with Qt compiled with this compiler, when I start the application, the Qbuttons have sharp edges and the png file shows up.
When I instead compile with a gcc 4.5.0 compiler build from the sources and Qt build with this compiler, when I start the application, the QButtons have more rounded edges and the .png graphic doesn't show up.

How can the compiler used have effect on how the GUI looks and wether the png loading code works??

My guess is that some environment variables are observed by applications build with the system compiler, while not when build with the custom compiler.

Any hints on how I can do further research here?
Philipp