[Qt-interest] Object::connect: No such slot
Benjamin
ikipou at gmail.com
Mon Dec 8 15:12:31 CET 2008
Have you updated the makefile since you add Q_OBJECT? The most likely cause
would be that the moc have not been run on your file.
Try "make qmake" to regenerate the Makefile.
Best regards,
Benjamin
2008/12/8 Ying Ma <y.ma at trinite.nl>
>
> Research & Development
> ------------------------------
>
> Hello,
>
> I got a problem when trying to connect signal with slot. my code is:
>
> class DripPage : public QWizardPage
> {
> Q_OBJECT
> public:
> DripPage( QWidget *parent = 0 );
> ~DripPage();
> ... ...
> public slots:
> void slotDelete( int which );
> ... ...
> };
>
>
> DripPage::DripPage( QWidget *parent ) : QWizardPage( parent )
> {
> MyWizard = ( DripConfigWizard * ) parent;
> ... ...
> connect(MyWizard, SIGNAL(customButtonClicked(int)), this,
> SLOT(slotDelete(int)));
> ... ...
> }
>
> void DripPage::slotDelete(int which)
> {
> ... ...
> }
>
> There is no compile error, but when I run the application, I get an
> error says:
> Object::connect: No such slot DripPage::slotDelete(int). What's the
> problem with my
> code? I really don't get it. Can you help me?
>
> Thanks!
> Best regards,
>
> Ying Ma
>
>
>
>
>
>
>
>
> *Ying Ma* Trinité Automatisering B.V. Tel. : 0297 382460 Post-adres:
> Postbus 189 Direct: - *Research & Development* 1420 AD Uithoorn,
> Nederland Fax : 0297 273049 Bezoek-adres: J.N.
> Wagenaarweg 6 Email: y.ma at trinite.nl 1422 AK Uithoorn,
> Nederland Website: www.trinite.nl
>
> ------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081208/3446e451/attachment.html
More information about the Qt-interest-old
mailing list