Fixes: Dont override windowsstyle on windows

Task:     Reported on #qt
RevBy:    dt
Details:
This code was only intended for X11, hence we
ifdef it for now. Obviously windows users might
want to use windows style.
This commit is contained in:
Jens Bache-Wiig
2009-01-14 17:04:23 +01:00
parent 3d3d01c4a3
commit 6b86542ae4
2 changed files with 2 additions and 0 deletions

View File

@@ -186,6 +186,7 @@ MainWindow::MainWindow() :
QCoreApplication::setOrganizationName(QLatin1String("Nokia"));
QSettings::setDefaultFormat(QSettings::IniFormat);
QString baseName = qApp->style()->objectName();
#ifdef Q_WS_X11
if (baseName == "windows") {
// Sometimes we get the standard windows 95 style as a fallback
// e.g. if we are running on a KDE4 desktop
@@ -195,6 +196,7 @@ MainWindow::MainWindow() :
else
baseName = "cleanlooks";
}
#endif
qApp->setStyle(new ManhattanStyle(baseName));
statusBar()->setProperty("p_styled", true);
}