That's not exactly how Qt detection works, though - in case of Qt 5, they set both `HAVE_QT5` and `HAVE_QT`, and most of the code only checks for `HAVE_QT`. In fact, if you look below in this file, `HAVE_QT5` is not even exposed as a macro. That I think is a reasonable approach.