How solve “Qt: Untested Windows version 10.0 detected!”

痴心易碎 提交于 2020-01-04 05:32:14

问题


I'm trying to use cmake for a project that has a lot of dependencies. I updated to Windows 10 some week ago, starting from Windows 7, and now I get this error.

How can I solve this problem considering I won't downgrade to Windows 7?

Thanks to all


回答1:


I think you use Qt version that was released before Windows 8 release. It might be Qt 4.8.x. To suspend the warning you need to update your Qt version or simply ignore that warning.

UPDATE

If the warning message makes real trouble, you can try to filter it out in the following way:

 #include <qapplication.h>
 #include <stdio.h>
 #include <stdlib.h>

 void myMessageOutput(QtMsgType type, const char *msg)
 {
     switch (type) {
     case QtDebugMsg:
         fprintf(stderr, "Debug: %s\n", msg);
         break;
     case QtWarningMsg:
         if (strstr(msg, "Qt: Untested Windows version") == 0) {
             // Print warning if it is not "Qt: Untested Windows..."
             fprintf(stderr, "Warning: %s\n", msg);
         }
         break;
     case QtCriticalMsg:
         fprintf(stderr, "Critical: %s\n", msg);
         break;
     case QtFatalMsg:
         fprintf(stderr, "Fatal: %s\n", msg);
         abort();
     }
 }

 int main(int argc, char **argv)
 {
     qInstallMsgHandler(myMessageOutput);
     QApplication app(argc, argv);
     ...
     return app.exec();
 }


来源:https://stackoverflow.com/questions/32966226/how-solve-qt-untested-windows-version-10-0-detected

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!