How do I know which version of Qt I am using? When I open Qt Creator it shows "Welcome to Qt Creator 2.3". In the build setting, however, it shows Qt Version 4.7.1.
Qt Creator automatically detects the Qt versions that are registered by your system or by installers. To view detailed information for each Qt version, select it in the list and select Details in the Qt version for section. To add Qt versions, select Tools > Options > Build & Run > Qt Versions.
That being said, under a Linux system we can simply use the following script to determine whether Qt is installed: if ! test -x /usr/bin/qmake then # The Qt library is missing... echo "error: This script requires Qt to be installed." exit 1 fi # The Qt library is installed ...do your thing...
When running /usr/sbin/system_profiler SPFrameworksDataType, the version of the QTkit is 7.6. 6. The value of the macro QT_VERSION_STR in qglobal.
For the per user install, the default installation will be a subdirectory called Qt in the current working directory. For the global install, the default location is /opt/Qt.
qmake-qt5 --version
or
qmake --version
Starting with Qt 5.3 you can use:
qtdiag
This prints a bunch of useful information. The first line includes the version:
Qt 5.5.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1 20160407) on "xcb"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With