1.針對QDate()的日期指向那邊
-2694 = QDate::currentDate().addDays(-QDate().daysTo(QDate::currentDate())).year() + QDate::currentDate().year();
目測是到公元前2694年
2.QT_VERSION的用法總結
pro文件 | h文件 | cpp文件 | |
contains(QT_VERSION, 4.8.6){message(supported)} | yes | ||
#if QT_VERSION == 0x040806 | yes | yes | |
#if QT_VERSION == QT_VERSION_CHECK(4, 8, 6) | yes | yes |
在qt4下,如果第一行沒有#include xx,直接調用#if QT_VERSION == 0x040806的話,同樣會報錯