如何把VC工程.vcproj转化为Qt工程.pro
来源:互联网 发布:pro怎么拆卸软件 编辑:程序博客网 时间:2024/05/18 06:26
我的环境配置是VS2008+Qt5,装的QT插件是qt-vs-addin-1.2.4-opensource,按道理说在装好插件后就可以创建.pro工程的,但是当打开一个vc工程后QT插件下面却是灰色的不可用状态,如下图所示:
谷歌了一下,搜到一个解决方案:http://stackoverflow.com/questions/2088315/how-to-convert-a-regular-win32-vc-vcproj-project-to-a-qt-project
Using Visual Studio 2010+ it is now possible to convert a project to a Qt Addin project, using the "Convert project to Qt Add-in project" feature of the Qt Addin.
The following steps are from the work around in bug QTVSADDINBUG-27. This was tested with Visual Studio 2010, but should work similarly with new versions:
- Right click on your project in "Solution Explorer", click on "Unload Project"
- Right click on your project in "Solution Explorer", click on "Edit .vcxproj"
- Add line
<Keyword>Qt4VSv1.0</Keyword>
between the tags<PropertyGroup Label="Globals">
and</PropertyGroup>
. - Right click on your project in "Solution Explorer", click on "Reload Project"
- Right click on your project in "Solution Explorer", click on "Convert project to Qt Add-in project"
If you have header files in your project you are going to have to follow the instructions in this answerto trigger the generation of moc_* files in the "Generated Files" folder.
For editions of Visual Studio older than 2010 see this work around.
但是按照上面的说法并没有那个PropertyGroup标签,后来灵机一动,虽然插件不能导出.pro工程,但是却可以打开一个.pro工程,所以打开了一个QT工程,就在vs上自动产生了vc工程,然后按照上面的办法,编辑.vcproj文件,对比后应该在原来的VC工程中修改和加入以下信息,在上面的第三步处。
注意上图中keyword=“Qt4VSv1.0”是需要修改的地方,还有下图的globals标签:
这样添加完后再reload project ,这样在看Qt插件中的选项就变为可选了,
接下来就可以继续往下操作了。
应老大要求写了一个文档:http://download.csdn.net/detail/enter_/9485356
- 如何把VC工程.vcproj转化为Qt工程.pro
- Qt .pro 工程文件转 VC .vcproj项目文件
- Qt .pro工程文件
- Qt 工程 pro文件
- Qt 工程 pro文件
- 根据qt工程pro生成工程
- Qt pro工程文件 介绍
- Qt pro工程文件 介绍
- QT pro工程文件介绍
- qt工程中Pro文件
- Qt pro工程文件 介绍
- QT工程pro文件详解
- vs2005 如何打开 qt .pro工程for wince
- Qt pro->vs工程和vs工程->pro
- Myeclispe10把一个带pom的普通工程转化为一个MAVEN工程
- pocket pc 工程转化为smartphone 工程
- VS2008工程转化为VS2005工程
- java工程转化为maven工程
- 相邻元素差的绝对值都是1,在这样的数组中找目标元素
- C++求某年某月的天数
- 【API设计风格—RESTful】:番外篇:跨域问题(四)
- 【bzoj1911】【APIO2010】【特别行动队】【斜率优化】
- css中hover伪类的bug
- 如何把VC工程.vcproj转化为Qt工程.pro
- 英特尔® 硬件加速执行管理器安装指南 — Microsoft Windows*
- POJ 1284 Primitive Roots 原根个数
- Qt5以上QMYSQL driver not loaded问题
- TopCoder SRM606 DIV1 250
- 中文分词技术(中文分词原理)
- leetcode第一题~~~Counting Bits
- iOS开发-通过btn传递两个实例对象 firstObject和secondObject
- 请求编码