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

Wm. G. Urquhart wgu at wurquhart.co.uk
Sun Feb 21 16:32:42 CET 2010


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



More information about the Qt-interest-old mailing list