[Kde-java] juic code generation problems

Maik Schulz list at maikschulz.de
Sun Jun 6 17:10:20 CEST 2004


Hi all,

I started playing with QT Designer... After updating juic from CVS I have been 
able to produce Java code for my GUI. There were a number of problems, 
however:

1. I use a QTable widget (named tblTracks) with 6 columns. The generated code 
contains one line per column, e.g.: tblTracks.addColumn( "Year" );

This cannot be compiled because the QWidget class does not contain a addColumn 
method. I rewrote the generated class as follows:

tblTracks.insertColumns(0, 6);
tblTracks.setColumnLabels(new String[] {"Album", "Artist", "Track", "Length", 
"Genre", "Year"});

This seems to produce the desired result.

2. I use a KListView widget and inserted a root element, a first level 
element, and a second level element in QT Designer, each with an icon. The 
icon images appear inline as QPixmap objects.

a) Only the root level element has been generated by juic. The others are 
missing while their icons are there.

b) The code to set the icon pixmap for the root element was wrong: 
listFolderTreeItem0.setPixmap( 0, "image1" );

The correct code would have been: listFolderTreeItem0.setPixmap( 0, image1 );

Unfortunately I have no idea about XSLT so I can't help you fix these issues. 
They appear rather minor though and I am really happy juic exists at all!

Thanks for listening,
-Maik

-- 
Emails accepted only from list. If you need to contact me
off list please exchange list with post in my email address.


More information about the Kde-java mailing list