PDA

View Full Version : QPixmap is null on other machines



sepehr
16th February 2009, 09:23
I have a pixmap in my program which works fine on my developing machine
QPixmap pic("c:/01.jpg");
but when I execute the program on another machine it doesn't seem to be loaded because the size method returns QSize(0,0) and when calling scaled method I get "pixmap is a null pixmap",I've tried it on couple of machines and permission issues are fine.
what seems to be the problem?
--
thanks in advance

talk2amulya
16th February 2009, 09:43
is 01.jpg in C drive on ALL machines???

aamer4yu
16th February 2009, 10:10
JPG is not supported directly by Qt.
You will need to copy jpg plugin dll to the new machine.
You can find it in QT_DIR/4.x.x/plugins/imageformats :)

zgulser
16th February 2009, 17:10
Hi,

I think the problem is not about the format of the image file, check the C drive out for 01.jpg as amulya said.

King Regards

sepehr
16th February 2009, 17:42
JPG is not supported directly by Qt.
You will need to copy jpg plugin dll to the new machine.
You can find it in QT_DIR/4.x.x/plugins/imageformats :)
exactly, you are right! problem solved!

nina1983
8th July 2011, 15:17
Dear all,

I'm experiencing the same problem and I cannot solved it.
I have a Qt Application that generates some .gif files and displays it on QLabel. It works fine on the DE I'm working with (MSVC Express 2008)
I deployed the Qt Application and run it on another Windows machine. The application runs but when it opens the .gif images it return the error
QPixmap::scaled: QPixmap is a NULL QPixmap. The path of the file is correct, I already check it.

I also copied the qgif4.dll in the libraries needed by my application but still doesn't work.
Am I missing something?

Thanks in advance for any help

Annalisa

Ginsengelf
12th July 2011, 07:24
Hi, the qgif4.dll needs to be located in the "imageformats" sub-directory, not in the directory where the other DLLs like qtgui4.dll are placed.

Ginsengelf