[Qt-jambi-interest] [BUG] JUIC use complete path to refer to icons

José Arcángel Salazar Delgado arcangel.salazar at gmail.com
Thu Jul 24 02:05:39 CEST 2008


Gunnar Sletta escribió:
> Jose Arcangel Salazar Delgado wrote:
>> Hi.
>> Look at this code that is generated by de JUIC when I set an Icon to a
>> QAction in the Designer using the Resource system:
>>
>> actionNuevo = new QAction(Ui_MainWindow);
>> actionNuevo.setObjectName("actionNuevo");
>> actionNuevo.setIcon(new QIcon(new
>> QPixmap("classpath:file:/home/arcangel/workspace/carniceria/src#com/linuxsoluciones/carniceria/resources/add.png"))); 
>>
>> QFont font = new QFont();
>
> Hi Jose,
>
> This is indeed the wrong behaviour. The classpath files should be 
> referenced relativly. How did you create this .jui file? When I try to 
> select resources in designer and save the jui file I only get relative 
> paths. Both for resources in the file system and resources located in 
> .jars.
>
>
> Best regards,
> Gunnar
>
Hi Gunnar.

Unfortunately I cannot reproduce the bug easily. This is my environment:
Eclipse ganymede+ qt jambi integration 4.4+ qt jambi 4.4

The .jui is generated through the designer inside the eclipse and the 
resources are in the classpath. Today I discover a trick. If you click 
in the three dots to set the Icon, the Choose Resource dialog is show, 
but this wrong behavior is exposed. If you click in the arrow and 
manually select the Choose Resource..  the  correct behavior is used in 
the Juic.

This happens when you have more that one resource, and the wrong 
behavior is  show in the non changed  resources.

I append a .jui that is broken because this bug.

Thanks for the help


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MainWindow.jui
Url: http://lists.qt.nokia.com/pipermail/qt-jambi-interest/attachments/20080723/b6a52a4c/attachment.pl 


More information about the Qt-jambi-interest mailing list