[Kde-java] Problem with polish method
David Goodenough
david.goodenough at btconnect.com
Tue Sep 28 17:41:20 CEST 2004
I am trying to use the juic package to take dialogs developed using Qt
Designer and convert them to Java.
I have been in discussions with the author of juic to iron out one or two
little wrinkles, but we are now both stumped.
Several of the dialogs that I wish to use contain DataTables and
DataBrowsers, and this causes juic to emit a polish method which
does the last initialisation of, in this case, the DataTable customers.
The polish method that juic emits reads:-
/**
* polish does some last initialization just before the widget
* is displayed. Here we setup:
* i) databases
* ...
*/
public void polish() {
if ( customers != null ) {
QSqlCursor cursor = customers.sqlCursor();
if ( cursor == null ) {
cursor = new QSqlCursor( "customers" );
customers.setSqlCursor( cursor, false, true );
}
if ( !cursor.isActive() )
customers.refresh( QDataTable.RefreshAll );
}
super.polish();
}
Unfortunately this leads to an infinite recursion, as
super.polish( ) just seems to reinvoke this polish routine.
The class that this is part of extends QMainWindow.
At first I thought this might be a code generation error
so rather than using the built in compiler from Eclipse
(within which I was developing this code) I tried the
Sun 1.4 javac command, and got the same result. Then
I tried running it with all of gij-3.3, gij-3.4 and the Sun
java. All failed in different ways, but none of them
worked.
If I removed the super.polish( ) the MainWindow
displayed, but all the widgets were in the top left
hand corner of the screen.
I am using KDE 3.2 (I also tried it on a 3.3 machine,
same result although I am running Debian unstable
and for some reason kdebindings and the rest of
kdevelop have not reached unstable yet). I am
running Qt 3.3.3 on both KDE 3.2 and 3.3.
Any ideas?
David
More information about the Kde-java
mailing list