diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index a316fe5161..1b9f0ef27c 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -4789,7 +4789,7 @@ void GuiView::resetDialogs() void GuiView::flatGroupBoxes(const QObject * widget, bool flag) { - for (const QObject * child: qAsConst(widget->children())) { + for (QObject * child: widget->children()) { if (child->inherits("QGroupBox")) { QGroupBox * box = (QGroupBox*) child; box->setFlat(flag); @@ -4815,9 +4815,11 @@ Dialog * GuiView::findOrBuild(string const & name, bool hide_it) Dialog * dialog = build(name); d.dialogs_[name].reset(dialog); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) // Force a uniform style for group boxes // On Mac non-flat works better, on Linux flat is standard flatGroupBoxes(dialog->asQWidget(), guiApp->platformName() != "cocoa"); +#endif if (lyxrc.allow_geometry_session) dialog->restoreSession(); if (hide_it)