Problem running a qt app.

David BOURIAUD david.bouriaud at
Wed Jun 14 10:15:49 BST 2000

Hi to all !
I'm confronted to the following problem :
I've modified the t2 qt tutorial so as to have a button that would call
a kvt terminal.
I'm not writing this app under kdevelop, for, by now, I'd just like to
know how qt works.
When I compile the following program, it works fine (eg. The compiler
does not complain about anything).
But when I run it, I get the following :
QObject::connect: No such slot QApplication::slotConnect()
QObject::connect:  (receiver name: 't2')
What's wrong with my source code ?
If anyone could help... Thanks by advance !

The source code of my file :
----------------------- begin of source code
#include <qapplication.h>
#include <qpushbutton.h>
#include <qfont.h>
#include <stdlib.h>

class MyApplication : public QApplication
    MyApplication (int a, char *t[]);
    QPushButton *go;
protected slots:
    void slotConnect();


MyApplication::MyApplication (int a, char *t[]) : QApplication (a, t)
    go = new QPushButton ("Go !");
    go->setFont ( QFont ( "Times", 18, QFont::Bold ) );
    setMainWidget (go);
    connect (go, SIGNAL(clicked()),SLOT(slotConnect()));

void MyApplication::slotConnect()
    system ("kvt &");

int main( int argc, char **argv )
    MyApplication a( argc, argv );
    return a.exec();
----------------------- end of source code

The Makefile provided with the t2 tutorial hasn't been modified at all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: david.bouriaud.vcf
Type: text/x-vcard
Size: 486 bytes
Desc: Card for David BOURIAUD
URL: <>

More information about the KDevelop mailing list