[Qt-interest] Object::connect: No such slot

xiaolei Shang xiaolei.shang at esrtechnology.com
Tue Dec 9 14:54:29 CET 2008


Hi there:

How did you define the class DripConfigWizard? If it inherits  from 
QWidget, the MyWizard should be initialised as:

MyWizard = dynamic_cast< DripConfigWizard * > (parent);

Cheers

Xiaolei
> 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 
> <http://www.trinite.nl>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   




More information about the Qt-interest-old mailing list