[Qt-interest] Runtime Error :- connect: No such slot (FIXED) But...

Ulf-Alexander v. Ceumern-Lindenstjerna ceumern at vrmagic.com
Mon Feb 22 10:56:06 CET 2010


Hi,

I suspect the moc files generated may not be the ones linked against
your project. Maybe different temporary paths for generated and included
files?

So, assuming you are using the latest qt-vs-addin (1.1.3), I suggest you
do the following steps:

1) clean your project
2) remove all .h (and .cpp) files from your project
3) manually clean all of your temp files, especially the generated moc
files
4) re-add all .h (and .cpp) files
5) make sure the moc steps are generated for the .h files by manually
checking the custom build steps
6) verify that the moc files included in your project are the ones
generated by the moc steps
7) build project

This would at least exclude the .pro->.vcproj conversion related issues.

Regards, Ulf

> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Wm. G. Urquhart
> Sent: Sunday, February 21, 2010 4:33 PM
> Cc: Qt-Interest
> Subject: Re: [Qt-interest] Runtime Error :- connect: No such slot
> (FIXED) But...
> 
> Sean Harmer wrote:
> > Wm. G. Urquhart wrote:
> >> Sean Harmer wrote:
> >>> Please post your project's .pro file it sounds like you may have a
> >>> mistake in there.
> >> Hi Sean,
> >>
> >> I don't think the .pro file used when the project is under Visual
> >> Studio? The .pro file I have hasn't been updated since 30th of Dec
> 09
> >> and the content in it is well out of date.
> >>
> >
> > That is likely the source of the problem then. You typically use the
> > .pro file to generate the visual studio project file. If whoever did
> > this originally had a mistake in there or if someone has since
> > introduced an inconsistency by manually editing the VS project file
> then
> > you could end up with this type of problem where one configuration
is
> > trying to use the generated files for some other configuration - or
> is
> > just picking up some completely stale file.
> >
> > I would suggest fixing up the .pro file and regenerating your visual
> > studio project file using qmake.
> 
> I couldn't see any 'quick' way of regenerating the .pro files and as
> they were so out of date I thought I'd try the solution without them,
> moving them to a safe place I re-started Visual Studio and loaded the
> project; no complaints there.
> 
> I then Added a new slot and code, rebuilt and ran, and my new slot
code
> was called as and when expected. Woohoo!
> 
> So, the .pro and .user.pro files were influencing the build process
but
> appear to be otherwise redundant, as the Qt plugin doesn't keep them
in
> sync with the main project, and I see no other way with the exception
> of
> manually doing it. (Or am I wrong?)
> 
> > ps It was this hassle that convinced me to switch to qt-creator on
> > windows as that just uses the .pro files to generate Makefiles
> directly.
> > It even re-runs qmake for you when needed.
> 
> Well given the choice I'd rather use Qt-creator for everything, but I
> simply couldn't get it to work successfully with the Intel Compiler.
> But
> maybe I need to revisit this at some point as I've got better things
to
> do at the weekend than chase down stuff like this.
> 
> For everyone that chipped in I appreciate the input so "Thank you"
all.
> 
> --
> Regards
> 
> William
> _______________________________________________
> 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