PDA

View Full Version : Qt4 integration with VS2008 Express how-to interest?



thomaspu
23rd December 2007, 19:35
Hello all,

I've been developing an application with Qt4 open-source edition and Visual Studio 2005/2008 Express editions. I'm an open-source developer and I've found that there really isn't a whole lot that we freebee users can use for easy Qt integration with Visual Studio when it comes to the build process. Seems like the choices are:

1) Re-run Qmake to re-create a .pro file each and every time a new file is added (qmake managed)
2) Create your own custom build steps to handle running Uic and Moc
3) Grab a bootlegged copy of Qt Integration :(

Here's my question to the Qt-Windows-VS users in the form:

Would any of you find it useful if I wrote a how-to guide and included the custom build steps and such that I used to create my own free Visual Studio integration?

I'd also post my build steps and build scripts for ease of helping first time users get up and running with freely available dev tools. With what I have now, Ui files are automatically handled. Moc files are automatically handled also based upon if a header file needs it or not.

I'd be interested in your opinions. Am I off my rocker here? Wasting my time? Do you know of a better way? Do you think its a good idea?

Let me know. Post!
Paul

elcuco
23rd December 2007, 20:00
... you forgot the part about eating dead kittens ...

Don't you think that what you are describing is ... wrong?

thomaspu
23rd December 2007, 20:02
Wrong how?

marcel
23rd December 2007, 20:16
3) Grab a bootlegged copy of Qt Integration :(I don't know about VS 2008 but all previous VS Express editions do not support extensions(plugins), so it won't do any good even if you get your hands on a cracked integration version.



... you forgot the part about eating dead kittens ...
Now that's just sick... Since it is Christmas, we will eat dead pigs.



2) Create your own custom build steps to handle running Uic and Moc
Don't you have to do that for every ui file and for every header that needs to be moc'ed?

thomaspu
23rd December 2007, 20:24
I don't know about VS 2008 but all previous VS Express editions do not support extensions(plugins), so it won't do any good even if you get your hands on a cracked integration version.

Now that's just sick... Since it is Christmas, we will eat dead pigs.

Don't you have to do that for every ui file and for every header that needs to be moc'ed?

Mmm! Can't wait to chow down on some good honey baked ham! The neat thing is that the way I am currently doing it is through a VS Build Rule File. Inside it you can specify what to run for different file types. So once that is setup, you tell your project to use that rule file and when it encounters either a .ui file or a .h file, it follows the appropriate rule in the rule file. So you don't need to type in a custom build rule for each and every .ui or .h file.

I have that up and running quite nicely ;p It's really slick, you just add Ui files and such as you normally do to the VS project and build. The only manual step needed is including the generated files in the project.

Paul

marcel
23rd December 2007, 20:28
The neat thing is that the way I am currently doing it is through a VS Build Rule File. Inside it you can specify what to run for different file types. So once that is setup, you tell your project to use that rule file and when it encounters either a .ui file or a .h file, it follows the appropriate rule in the rule file. So you don't need to type in a custom build rule for each and every .ui or .h file.


In this case it would really be nice to have something like that. Although I use Eclipse for most of my programming, it is really nice to know that I can use VS with Qt Open Source without too much overhead.

bender86
24th December 2007, 11:15
I use qt4 with msvc2005/8 express this way:
http://qtnode.net/wiki?title=Qt4_with_Visual_Studio#Another_way_for_ creating_and_maintaining_Visual_Studio_Projects

It works well, if only I could understand how make a project template with nmake settings already setted up, it would be perfect.

elcuco
25th December 2007, 09:24
Now that's just sick... Since it is Christmas, we will eat dead pigs.


Some of are are jewish, so this Christmas stuff... like what are you talking about? :)
Lets not get into pigs please :p:p

Now, in this thread there is a link to a qtnode page which described how to use VisualStudio (Express) to compile Qt4 applications. Can any one comment on the speed of the compilation compared to mingw? executable size, speed?

I know magland is using a pure command line to build his projects under windows (using qmake/nmake/cl). But can anyone comment on the technique described there (using a custom build). Can you debug? F4 jumps to errors/warnings?

marcel
25th December 2007, 11:56
Now, in this thread there is a link to a qtnode page which described how to use VisualStudio (Express) to compile Qt4 applications. Can any one comment on the speed of the compilation compared to mingw? executable size, speed?

Well, Ms compilers are known to be faster than GNU compilers. That's a fact.
I don't know about optimizations and sizes, never compared them.



But can anyone comment on the technique described there (using a custom build). Can you debug? F4 jumps to errors/warnings?

The build method has nothing to do with it. What you are asking about is IDE related stuff.
As long as you successfully build your project inside the IDE you can also debug it and use all IDE features.

thomaspu
26th December 2007, 00:47
Would any of you like to play "guinea pig" and test out a how-to based upon my build rule file? I think I'll try writing it up tonight or tomorrow. I'd like to make sure that stuff works ok on other systems besides mine, you know crazy quirks and such.

Paul

thomaspu
26th December 2007, 06:27
Well, I finished up my how-to and have my build setup ready for the masses. Just one question, where should I post this thing? Its about ~60KB zipped and includes the how-to, my autoMoc and autoUic programs, the VS .rules file and a 2008 project example. The how-to shows the user how to setup a project from start to finish.

Paul

notsonerdysunny
21st May 2008, 12:53
Hi Thomaspu..
Can you please post the project files which integrate qt with visual studio?... you can email the file over to me at

su#$nil d$o%t nandihalli a#$t g#mai#l dot c#o#m

Please ignore all the special characters when you reply...
Thanks