升级到 Qt 6.0 后,编译器告诉我
qzxing/src/QZXing.cpp:16: error: 'QtCore/QTextCodec' file not found
qzxing/src/QZXing.cpp:16:10: fatal error: 'QtCore/QTextCodec' file not found
#include <QtCore/QTextCodec>
^~~~~~~~~~~~~~~~~~~
qzxing/src/QZXing.cpp:16:10: note: did not find header 'QTextCodec' in framework 'QtCore' (loaded from '/Applications/Qt/6.0.0/clang_64/lib')
根据Qt 的文档,可以通过添加QT += core5compat
. 但是,编译器告诉我“QT 中的未知模块:core5compat”。
如何解决这个问题呢?