开发者

Adding QT Form to an existing VS2008 project

开发者 https://www.devze.com 2023-01-12 20:39 出处:网络
I have a normal VS2008 project that I\'ve been working on for awhile that is doing some OpenGL based stuff. The main window is created with GLUT and until now that has been sufficient for my GUI.

I have a normal VS2008 project that I've been working on for awhile that is doing some OpenGL based stuff. The main window is created with GLUT and until now that has been sufficient for my GUI.

Now, however, I want to add a small window of buttons, and I need to do it in a cross platform way, so I decided to use QT. I've installed all of the QT components including the VS add-in and everything seems to work fine, but I can't figure out how to add a QT form to my project (since it wasn't originally configured to use QT). I really don't want to create a new project in QT Creator and migrate all of my existing code into it, since I already have development environments set up and configured correctly for this code base on three differe开发者_运维问答nt platforms. Is there some way to tell visual studio to just do the right thing with the .ui file so I can use it in my existing project?

EDIT: By the way, when I say I can't figure out how to add a QT form to the project, I am able to add a form--meaning a .ui file--that when clicked on opens the QT designer. What I can't figure out how to do is make it compile. It has a "custom build rule" added by default, but the command line is blank, and I don't know enough about qmake to get it to build the .ui file for me.


I use these line as custom build rule (where $QTDIR is the location of your Qt installation):

"$(QTDIR)\bin\uic.exe" -o ".\tmp\ui_$(InputName).h" "$(InputPath)"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号