[Kde-java] Re: KDatePicker
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Thu Oct 21 21:10:27 CEST 2004
Can you post the whole program to make it easier to reproduce the crash? If I
try:
KApplication app = new KApplication();
KCmdLineArgs args = KCmdLineArgs.parsedArgs();
QWidget myWidget = new QWidget();
KDatePicker kDatePicker1 = new KDatePicker( myWidget, "kDatePicker1" );
kDatePicker1.setGeometry(40, 10 + 20, 300, 170);
myWidget.show();
app.setMainWidget(myWidget);
app.exec();
It works fine..
-- Richard
On Thursday 21 October 2004 17:11, David Goodenough wrote:
> Richard,
>
> I have moved ever onwards, and into another slight problem.
>
> I have a QDialog which contains a KDatePicker, and when the
> juic generated code comes to create the KDatePicker, kdejava
> goes bang.
>
> The juic code looks like:-
>
> public dateChooser(QWidget parent, String name, boolean modal, int
> flags) {
> super(parent, name, false, flags);
> if (name == null) setName("dateChooser");
> this.setGeometry( new QRect( 0, 0, 299, 234 ) );
> this.setCaption( tr( "Choose a Date" ) );
> dateChooserVbox = new QVBoxLayout( this, 11, 6, "dateChooserVbox"
> ); kDatePicker1 = new KDatePicker( this, "kDatePicker1" );
> layout1Hbox = new QHBoxLayout( (QWidget)null, 0, 6, "layout1Hbox"
> ); okButton = new QPushButton( this, "okButton" );
> okButton.setText( tr( "OK" ) );
> cancelButton = new QPushButton( this, "cancelButton" );
> cancelButton.setText( tr( "Cancel" ) );
> layout1Hbox.addWidget( okButton );
> layout1Hbox.addWidget( cancelButton );
> dateChooserVbox.addWidget( kDatePicker1 );
> dateChooserVbox.addLayout( layout1Hbox );
> resize(size().expandedTo(minimumSizeHint()));
> connect( okButton, SIGNAL( "clicked()" ), this, SLOT( "accept()"
> )); connect( cancelButton, SIGNAL( "clicked()" ), this,
> SLOT( "reject()" ));
> }
>
> and it dies on the kDatePicker1 = new KDatePicker line. The stack
> trace looks like (line 78 is the constructor):-
>
> An unexpected exception has been detected in native code outside the VM.
> Unexpected Signal : 11 occurred at PC=0x4EC464B7
> Function=_ZNK9KInstance6configEv+0x17
> Library=/usr/lib/libkdecore.so.4
>
> Current Java thread:
> at org.kde.koala.KDatePicker.newKDatePicker(Native Method)
> at org.kde.koala.KDatePicker.<init>(KDatePicker.java:78)
> at
> uk.co.dga.linkchoose.qtUi.dateChooser.<init>(dateChooser.java:98) at
> uk.co.dga.linkchoose.qtUi.dateChooser.<init>(dateChooser.java:57) at
> uk.co.dga.linkchoose.qtUi.DateChooser.<init>(DateChooser.java:26) at
> uk.co.dga.linkchoose.qtUi.Main.initialCharge(Main.java:236) at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> at org.kde.qt.Invocation.invoke(Invocation.java:185)
> at org.kde.qt.QApplication.exec(Native Method)
> at uk.co.dga.linkchoose.qtUi.Main.main(Main.java:44)
>
> Unfortunately java (and come to that gij-3.4) is not more helpful in
> telling is where in the method it died.
>
> Any ideas.
>
> David
More information about the Kde-java
mailing list