mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
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:
parent
08b4be9c2e
commit
9577cc7c25
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user