简体   繁体   English

Qt5到Qt4 UI文件兼容性

[英]Qt5 to Qt4 UI File Compatibility

Are Qt5 generated UI/form files backwards compatible with Qt4? Qt5生成的UI /表单文件是否向后兼容Qt4? As in, can I take the source, headers, and UI files and recompile with Qt4 without issue? 如我所知,我可以获取源文件,标题和UI文件并使用Qt4重新编译而不会出现问题吗?

The files generated by uic in Qt 5 will have #include <QtWidgets/QFoo> , which of course doesn't work in Qt 4. 由Qt 5中的uic 生成的文件将具有#include <QtWidgets/QFoo> ,这当然在Qt 4中不起作用。

Or are you talking about .ui files generated by Qt Designer / Creator? 或者你在谈论Qt Designer / Creator生成的.ui文件? Those will instead work without changes (modulo using Qt 5-only or Qt 4-only classes, of course). 相反,这些将在没有变化的情况下工作(模数仅使用Qt 5-only或Qt 4-only类,当然)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM