Thanks. I use the following "code" in a *.pro file to check if Qt version >= 4.5.3:
!contains(QT_MAJOR_VERSION, 4) {
error("you are using an old version of Qt")
}
LIST = 0 1 2 3 4
for(a, LIST):contains(QT_MINOR_VERSION, $$a):error("you are using an old version of Qt")
contains(QT_MINOR_VERSION, 5) {
LIST = 0 1 2
for(a, LIST):contains(QT_PATCH_VERSION, $$a):error("you are using an old version of Qt")
}
!contains(QT_MAJOR_VERSION, 4) {
error("you are using an old version of Qt")
}
LIST = 0 1 2 3 4
for(a, LIST):contains(QT_MINOR_VERSION, $$a):error("you are using an old version of Qt")
contains(QT_MINOR_VERSION, 5) {
LIST = 0 1 2
for(a, LIST):contains(QT_PATCH_VERSION, $$a):error("you are using an old version of Qt")
}
To copy to clipboard, switch view to plain text mode
Bookmarks