S
Hi Leute!
Ich schreibe ein Kickerapplet für SuSE, folgendes Problemm:
Mit Qt-Designer automatisch erzeugte Klasse (QDialog GUI):
class PreferencesDialog : public QDialog
{
Q_OBJECT
public:
PreferencesDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~PreferencesDialog();
QPushButton* buttonHelp;
QPushButton* buttonOk;
QPushButton* buttonCancel;
protected slots:
virtual void languageChange();
};
Die von mir abgeleitete Klasse:
class EinstellungenDialog : public PreferencesDialog
{
Q_OBJECT
public:
EinstellungenDialog(QString* interface, QWidget* parent , KConfig * ksConfig);
~EinstellungenDialog();
public slots:
void OKpressed();
};
Slot realisierung:
void OKpressed()
{
KMessageBox::information(0,"blabla");
}
Konstruktor von der Dialogklasse:
EinstellungenDialog::EinstellungenDialog( QString* interface, QWidget* parent, KConfig * ksConfig)
{
connect( /*(QObject*)*/ buttonOk, SIGNAL(clicked()),SLOT(OKpressed()));
}
Und anschließend die KDevelop Ausgabe:
prefer.cpp: In constructor EinstellungenDialog::EinstellungenDialog(QString*, QWidget*, KConfig*)': prefer.cpp:24: error: no matching function for call toEinstellungenDialog::
connect(QPushButton*&, const char[11], const char[13])'
/usr/lib/qt3/include/qobject.h:116: error: candidates are: static bool
QObject::connect(const QObject*, const char*, const QObject*, const char*)
/usr/lib/qt3/include/qobject.h:227: error: bool
QObject::connect(const QObject*, const char*, const char*) const
prefer.cpp: In member function `
EinstellungenDialog::EinstellungenDialog(QString*, QWidget*, KConfig*)':
Erst wenn ich die Typumwandlung mache lässt das Prog sich kompilieren, und dann stürzt es zur Laufzeit ab beim drücken auf OK Button. Hat einer vielleicht Ahnung warum?