电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

从Qt4.x升级至Qt5工程代码需做的改变

从Qt4.x升级至Qt5工程代码需做的改变_第1页
1/11
从Qt4.x升级至Qt5工程代码需做的改变_第2页
2/11
从Qt4.x升级至Qt5工程代码需做的改变_第3页
3/11
从Qt4.x升级至Qt5工程代码需做的改变 分类: Qt 2013-07-28 00:31197人阅读评论(0)收藏举报 目录(?)[+] 原文链接:点击打开链接 The transition from Qt 4.x to Qt 5 is not expected to be significant. However, the “modularization” of the Qt code base requires some amount of changes to project configuration, such as use of “headers”, and configuration of project build settings (such as changes to the *.pro files). Qt Creator (master) is compiled using Qt 4 and Qt 5; you can refer to its sources to get an overview of what is required to port an application and keep the sources backwards compatible to Qt 4. QtWidgets as a Separate Module example compile time errors error: QMainWindow: No such file or directory error: QToolButton: No such file or directory error: QWidget: No such file or directory Solution Add this in your *.pro file: QT += widgets Change all instances of #include to #include The code should work now, though sometimes you may require to be more explicit: #include QtWebKitWidgets is also a separate module: example compile time errors error: invalid use of incomplete type 'class QWebFrame' error: forward declaration of 'class QWebFrame' Solution Add this in your *.pro file: QT += webkitwidgets Note: when you have QT += webkitwidgets you don’t need QT += widgets In addition, replace all instances of #include to #include You can try this by porting a WYSISWYG html editor [qt.gitorious.org] from Qt 4 to Qt 5. QPrinter Doesn’t Work If your code has the following lines: #include #include add the following to your project file: QT += printsupport Again, sometimes it may not work and you would need to be...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

从Qt4.x升级至Qt5工程代码需做的改变

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部