来源 https://www.qt.io/cn/blog/2012/05/16/source-code-must-be-utf-8-and-qstring-wants-it
------------------------
来源 https://doc.qt.io/archives/qt-4.8/qstring.html
Macro Documentation
QT_NO_CAST_FROM_ASCII
Disables automatic conversions from 8-bit strings (char *) to unicode QStrings
See also QT_NO_CAST_TO_ASCII and QT_NO_CAST_FROM_BYTEARRAY.
QT_NO_CAST_TO_ASCII
disables automatic conversion from QString to 8-bit strings (char *)
See also QT_NO_CAST_FROM_ASCII and QT_NO_CAST_FROM_BYTEARRAY.
# DEFINES: 宏定义集合 DEFINES += QT_NO_CAST_FROM_ASCII DEFINES += QT_NO_CAST_FROM_BYTEARRAY DEFINES += QT_NO_CAST_TO_ASCII DEFINES += QT_NO_URL_CAST_FROM_STRING DEFINES += QT_USE_QSTRINGBUILDER # QT_DEPRECATED_WARNINGS: 使用不推荐或废弃模块时,产生对应的警告信息 # The following define makes your compiler emit warnings if you use # any Qt feature that has been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # QT_DISABLE_DEPRECATED_BEFORE: 使用不推荐或废弃模块时,在指定QT版本之前禁用对应的警告信息 # You can also make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
==================== End
来源:https://www.cnblogs.com/lsgxeva/p/12161878.html