December 30, 2010

Wajahat Karim Wajahat Karim
Lab Rat
1 posts

Generating Header and CPP file from .ui file in Visual Studio 2008

 

I am currently working in a simulator project. And I have got an Open-Source C++ project. So in that project, I have a .ui file made in Qt 3.3. Along with it, I have some Generated .h and .cpp files included in that Visual Studio Project. Now when I change any of .ui, generated .h, or generated .cpp file, then that solution stop working. So now, I am making my own .ui file using Qt 4.8. My question is that how to include it in Visual Studio 2008 project. Or how to generate .h and .cpp file from .ui file?

Thanks for your support.

4 replies

December 30, 2010

Gerolf Gerolf
Area 51 Engineer
3210 posts

If you use the MSVS integration, there are custom build steps for the ui files, which are done automatically for Qt projects. If you are working without MSVS integration, you can use the tool uic to build the .h file. More information can be found in the documentation here [doc.qt.nokia.com]

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

December 30, 2010

Wajahat Karim Wajahat Karim
Lab Rat
1 posts

@Gerolf
Thanks for your help. But I am not getting how to do it as I have not much experience on Qt. So can you send me any sample code or example something. Maybe you can send me tutorials also.

Thanks for your help….

December 30, 2010

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

There are a lot of documentation and examples in Qt Assitant or in online help [doc.qt.nokia.com]

December 31, 2010

Gerolf Gerolf
Area 51 Engineer
3210 posts

Hi Wajahat,

the link I posted points to uic documentation, uic is the User Interface compiler, which creates source code from designer xml.

Again the link: uic [doc.qt.nokia.com]

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

 
  ‹‹ Game Design with MVC      Game Interfaces ››

You must log in to post a reply. Not a member yet? Register here!