Gui: Add QtStyle user parameter
This allows theme developers to set proper Qt style.
This commit is contained in:
committed by
Chris Hennes
parent
433dcec0be
commit
62463fa0bd
@@ -229,6 +229,7 @@ void StartupPostProcess::execute()
|
||||
setWheelEventFilter();
|
||||
setLocale();
|
||||
setCursorFlashing();
|
||||
setQtStyle();
|
||||
checkOpenGL();
|
||||
loadOpenInventor();
|
||||
setBranding();
|
||||
@@ -296,7 +297,6 @@ void StartupPostProcess::setLocale()
|
||||
else if (localeFormat == 2) {
|
||||
Translator::instance()->setLocale("C");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void StartupPostProcess::setCursorFlashing()
|
||||
@@ -307,6 +307,13 @@ void StartupPostProcess::setCursorFlashing()
|
||||
QApplication::setCursorFlashTime(blinkTime);
|
||||
}
|
||||
|
||||
void StartupPostProcess::setQtStyle()
|
||||
{
|
||||
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("General");
|
||||
auto qtStyle = hGrp->GetASCII("QtStyle");
|
||||
QApplication::setStyle(QString::fromStdString(qtStyle));
|
||||
}
|
||||
|
||||
void StartupPostProcess::checkOpenGL()
|
||||
{
|
||||
QWindow window;
|
||||
|
||||
Reference in New Issue
Block a user