How do I draw an image with Qt?
I am having big problems trying to put an gif-image into an application written in Qt. I have removed all the other code and right now I am just trying to make an image, nothing else. The image-widget is in the class RedBar and that is the only class I have. So here are my files:
Code:
bar.h Code:
bar.cc Code:
main.cc Code:
$ ./app redbar.gif |
Try saving your test file to a different format (e.g. .png) and see if it works.
If so, then your Qt libraries weren't compiled with .gif support (this is a non-default option). 'Hope that helps .. PSM |
try calling
repaint(); after you load that image to trigger the paintEvent |
Now Qt can't write .GIF format. Just read.
|
All times are GMT -5. The time now is 06:00 AM. |