[Qt-interest] Runtime Error :- connect: No such slot ...
Sean Harmer
sean.harmer at maps-technology.com
Fri Feb 19 09:44:15 CET 2010
Hi,
On Thursday 18 February 2010 20:47:07 Wm. G. Urquhart wrote:
> Hi All,
>
> I have a class derived from QThread that contains some signals, but when
> I try to connect these signals to the UI I get a runtime error telling
> me that the SLOT to which I want to connect said signals to does not exist.
>
> In the UI header file I have
>
> private slots:
> void loadComplete(size_t) ;
>
> and in the UI .cpp I have :
>
> void MyApp::loadComplete(size_t count)
> {
> ui->statusBar->showMessage(tr("Loaded %1 rows. Done.").arg(count), 5000)
;
> }
>
> And this is the line I use to try to connect:
>
> connect(sqlLoader, SIGNAL(loadEnded(size_t)), this,
> SLOT(loadComplete(size_t))) ;
>
> Both of the applicable headers are MOC processed and both contain the
> Q_OBJECT macro, which leaves me seriously confused.
>
> Can anyone shed some light on this please?
Probably yes, if you can provide a minimal compilable example that reproduces
the problem. In doing so you may even spot the problem yourself.
Cheers,
Sean
More information about the Qt-interest-old
mailing list