简体   繁体   中英

Checking if QBool is available in Qt

Qt4 had QBool that is not available in Qt5 ( http://qt-project.org/doc/qt-5.0/qtdoc/sourcebreaks.html ). Does anyone have a clue how to check if QBool is available in curret compilation?

CHecking Qt version should be enough. Is there possibility / way to check Qt's version like VC++'s _MSC_VER where we can check VC++ version and choose what to compile by pre-processors

Both Qt4 and Qt5 define QT_CORE_LIB (when QT += core set in project file)

Thanks

您可以使用QT_VERSION宏。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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