Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
-
d05f2fb2d (dev), 4034cc7c1 (6.5), de310d34c (6.4)
Description
I'm using QSysInfo::productVersion. For me, it returns 10.0 under Windows 11, and 10.16 under macOS Big Sur, macOS Monterey.
It's NOT a Qt bug. It's the way these OSes behaves. However, it's still possible to detect actual versions.
Windows: one have to use RtlGetVersion + some additional tricks.
https://stackoverflow.com/questions/69373447/is-there-an-official-way-to-detect-windows-11.
macOS: version can be read from this file: /System/Library/CoreServices/.SystemVersionPlatform.plist
https://stackoverflow.com/questions/75413538/troubles-getting-an-actual-macos-version
So, I suggest something like QSysInfo::nonCompatProductVersion. It should try to do its best to detect an actual version. But it should be explicitly stated in the docs, that there is no guarantee for it to work 100% accurate.
Attachments
Issue Links
- is duplicated by
-
QTIFW-3247 Error when checking version using systemInfo.productVersion
-
- Closed
-