Add autodetection windows version for styles

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3267 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810 2014-08-11 13:08:43 +00:00
parent 08b4be9c2e
commit 9577cc7c25

View File

@ -936,6 +936,21 @@ void QETApp::invertMainWindowVisibility(QWidget *window) {
if (QMainWindow *w = qobject_cast<QMainWindow *>(window)) setMainWindowVisible(w, !w -> isVisible());
}
/**
Autodetec Windows style
@param Windows style
*/
#ifdef defined(Q_WS_WIN)
if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA
&& QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
style = QLatin1String("WindowsVista");
else if ((QSysInfo::WindowsVersion >= QSysInfo::WV_XP
&& QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
style = QLatin1String("WindowsXP");
else
style = QLatin1String("Windows"); // default styles for Windows
#endif
/**
Change la palette de l'application
@param use true pour utiliser les couleurs du systeme, false pour utiliser celles du theme en cours