Hi Gunnar,

I tried to run your program, and it was successful. Tried it with may images... 
successful. But I still couldn't show the image by using a QPixmap.
After digging in more into details, I discovered my image got currupt in some 
way. So after re-creating my image everything worked fine. So sorry for posting 
this problem that was caused by my stupid mistake :-).

/Dimitri



Gunnar Sletta <[EMAIL PROTECTED]> wrote:
 
> Dimitri Frederickx wrote:
>> I've created an eclipse project (under Mac OS X). My eclipse project has two 
>> source directories. In both source directories I have a folder images: in 
>> the 
>> first folder I have an image called image_1.png and in the other folder I 
have 
>> an image called image_2.png.
>> 
>> So my directory looks like this:
>> project
>>   |- src1
>>   |    |-images
>>   |         |-image_1.png
>>   |- src2
>>   |    |-images
>>   |         |-image_2.png
>> 
>> I want to create a new QIcon for both images with:
>> classpath:/images/images_1.png
>> classpath:/images/images_2.png
>> 
>> It seems that Qt Jambi can handle this. When I want to show both images, 
>> only 
>> one image is shown: the one in the directory that was the first on the 
>> classpath. I have to give each images directoy a unique name in order to 
>> make 
my 
>> code work.
>> 
>> When Qt Jambi can't find my second image in the first images directory, I 
>> has 
to 
>> look further on the classpath to see if there might be another directory 
called 
>> images. But it seems it doesn't.
>> 
>> Is it possible that this is a bug?
> 
> I cannot reproduce this when running this example from the command line 
> and using the directory structure you outlined above.
> 
> import com.trolltech.qt.*;
> import com.trolltech.qt.core.*;
> 
> public class DoubleClassPath
> {
>      public static void main(String args[]) {
>          QCoreApplication.initialize(args);
> 
>          System.out.println("images/file1.txt: " + new 
> QFile("classpath:images/file1.txt").exists());
>          System.out.println("images/file2.txt: " + new 
> QFile("classpath:images/file2.txt").exists());
>      }
> }
> 

_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to