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

Sean Harmer sean.harmer at maps-technology.com
Sun Feb 21 17:19:38 CET 2010


Hi,

Wm. G. Urquhart wrote:
> 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.

qmake -project

will generate you a boiler plate .pro file from the source, header, ui 
and resource files it finds in the directory.

> 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?)

I have not used the Qt plugin for VS for a while now but as far I 
remember the .pro file was just used by qmake to generate the MSVC 
project file. Not sure about the .user.pro file.

>> 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.

I don't have access to the Intel C++ compiler but it works well with the 
  MS compiler toolchain. However, it should just be a case of getting 
qmake to use the correct mkspec file so that the generated Makefiles 
call the icc tool rather than gcc or the MS compiler. The qt-creator 
list will be able to help you more with this I expect.


> For everyone that chipped in I appreciate the input so "Thank you" all.

No problem. Good luck with the rest of your project.

Sean



More information about the Qt-interest-old mailing list