当前位置: 代码迷 >> QT开发 >> QT5.0下的交叉编译有关问题
  详细解决方案

QT5.0下的交叉编译有关问题

热度:67   发布时间:2016-04-25 03:47:42.0
QT5.0下的交叉编译问题
写好的QT界面程序 在QTcreator下编译都可以 没有错误 
qmake -project ,qmake都可以生成.pro和Makefile
但是在make时出现错误,没有QMainWindow文件 ,求大神解决
Qt5 交叉编译

------解决方案--------------------
在pro文件上加上greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
------解决方案--------------------
官方文档上说明了,如果是自己qmake的话,得加上qt += widgets:
You could also use qmake's -project option to generate the .pro file. Although, in that case, you have to remember to add the line QT += widgets to the generated file in order to link against the Qt Widgets Module.
------解决方案--------------------
引用:
在pro文件上加上greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

+1
  相关解决方案