[Qt-interest] Qt open source and VS 2008... how to make it work?
Frederic Tingaud
tingaud at gostai.com
Fri Feb 19 15:31:21 CET 2010
Oliver.Knoll at comit.ch a écrit :
> David Ching wrote on Friday, February 19, 2010 3:23 AM:
>
>
>>> ...
>>> I need to use Qt with Visual Studio 2008.
>>>
>> Welcome from a fellow Qt'er on Visual Studio!
>>
>
> Also note that even though Qt provides a nice "Qt integration" for Visual Studio, that plugin won't work with the *Express* versions - simply because the Express don't support plugins (on purpose - if you need this, take $$$ into your hands).
>
> That is true for VS 2005 Express, but I strongly believe that this still holds for the VS 2008 Express and probably the upcoming 2010, too.
>
> That does *not* mean that you can't use Qt with the Express versions. It simply means that you need to either
>
> - have your Visual Studio projects (re-) generated from the Qt *.pro file (see qmake and the 'vcapp' template)
> - manually add the "post-build" steps to the *.h header files which need to be moc'd/*.ui files which need to be compiled
>
> Disadvantage of the former (qmake): you loose any custom settings you do within Visual Studio each time you re-generate the Visual Studio projects (because you have added new source/UI files to your *.pro files, for example). Advantage: platform-independent: you can generate Makefiles for Unix/Linux, Windows, Mac...
>
> Disadvante of the later (Visual Studio): it is a pain to manually update the post-build steps! But doable... and the advantage is that e.g. it is very easy to set dependencies between projects (e.g. your *.exe and *.dll(s)), the header dependencies are automagically set (so when you change a header the dependent projects get re-build as well etc.)
>
>
> Cheers, Oliver
>
I use Qt with Visual Studio Express and we use a third solution, that is
to generate the project through CMake. It is cross-platform, it handles
moc/ui generation and most of the custom settings to the project that
could be done can be scripted in CMake in order to keep them when
regenerating the project. I find it extremely convenient.
The only drawback I have with this solution is that it uses the
post-build events and when calling "Build" while a debug is already
running (a dialog asks if you want to stop the previous debug), VSE
doesn't do the post-build steps (I use 2005).
Frederic TINGAUD
More information about the Qt-interest-old
mailing list