Qt-interest Archive, March 2008
Re: VS2005 header files and qmake
Message 1 in thread
Thanks for your helpful reply here. I was also having intellisense
problems, and I tried all of the things on this thread. None of them
worked. I am using the visual studio integration with VS2008.
But on your suggestion, I tried this:
qmake -tp vc
And it skipped over all the source because there were no .vcproj files
already created for them. But this led me to the eventual solution,
which should have been obvious to me before:
close my solution
qt menu - open solution from .pro file
select the src.pro file
at this point, intellisense starts indexing the whole project.
When it's done, I close this solution and open my qt solution.
Completion works great again.
Cheers --alan
On Thu, Jan 31, 2008 at 2:29 AM, Marius Storm-Olsen
<marius@xxxxxxxxxxxxx> wrote:
> Tony Rietwyk said the following on 31.01.2008 10:09:
>
> > I am converting Delphi to C++ and Qt. On several occasions, a
> > converted header file causes intellisense problems. As soon as I
> > change one of the classes in the header to be based on QObject, and
> > add a HEADER entry for it in the .pro file, and recreate the
> > project, then suddenly intellisense works on all of the converted
> > classes in that header file.
> >
> > When it does work, it can be real typing saver. What makes it so
> > frustrating when the control-J member selection doesn't work, is
> > that hovering the mouse over the variable shows the correct type
> > hint!
> >
> > The other problem is that jumping between the declaration and
> > definition gets screwed - jumping from a descendent override
> > declaration to the base implmentation!
> >
> > And all MS can suggest is to close the project, delete the .pdb,
> > reopen and rebuild the whole project!
>
> Here's something to try:
>
> Adding Qt projects as unloaded sub-folder targets
> -------------------------------------------------
> In your projects Solution file, you can create a subfolder, and in
> this subfolder you can load the <QTDIR>/src/src.sln file (you might
> need to 'qmake -tp vc' in that directory first to get the src.sln file)
>
> Leave the projects loaded for a little bit, so the Intellisense has
> the time to index all the sourcefiles. Then, when you seem to get good
> response from the Intellisense in your project, select the sub-folder,
> right-click and choose "Unload Projects in Solution Folder", then
> save your current solution.
>
> Hopefully this will leave you with good intellisense for all of Qt
> without having to load those projects next time you open your solution
> file.
>
> If the above fails for you
> --------------------------
> Have you tried Visual Assist X? They have their own 'Intellisense'
> integrated into Visual Studio which is pretty good. Should give you
> proper tab completion without having to mess with adding Qt sources.
>
> --
> .marius
>
>
--
[ signature omitted ]
Message 2 in thread
Alan Ezust wrote:
> Thanks for your helpful reply here. I was also having intellisense
> problems, and I tried all of the things on this thread. None of them
> worked. I am using the visual studio integration with VS2008.
>
> But on your suggestion, I tried this:
> qmake -tp vc
>
> And it skipped over all the source because there were no .vcproj files
> already created for them. But this led me to the eventual solution,
> which should have been obvious to me before:
>
The solution for that is also simple:
qmake -tp vc -r
to recursively process the .pro files.
--
[ signature omitted ]