Hi,
what should i do to know which OS my application is running on?
I have to check if it's running on Windows or Linux machine, is there anything better then enum QSysInfo::WinVersion?
thx
Hi,
what should i do to know which OS my application is running on?
I have to check if it's running on Windows or Linux machine, is there anything better then enum QSysInfo::WinVersion?
thx
you can also use those preprocessor defines:
http://doc.trolltech.com/4.3/qtglobal.html#Q_WS_X11
Use QSysInfo class
Sorry didn't read post to the end![]()
Last edited by THRESHE; 19th March 2008 at 12:29.
C++ & AMD forever
Basically, your application should always be running on the OS on which it has been compiled (except for versions of course) so preprocessors should do here. Alternatively, if you don't want to mess with preprocessors everywhere just define a global method returning an enum (e.g {Linux, Mac, Windows, ...}) whose return value would be set through preprocessors. And finally, I doubt there is a clean method to determine whether the app might be running on an emulator (eg Wine...)
Current Qt projects : QCodeEdit, RotiDeCode
Bookmarks