From b22ca46dc5e19e3aa5fb16e47a34407432bab7f4 Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Fri, 8 Mar 2019 10:23:18 +0100 Subject: [PATCH] #4187 Make WindowCloseButtonHint part of the default dialog flags * Dialogs on the Qt5 build has the close button disabled and this fixes that. --- .../RicShowPlotDataFeature.cpp | 15 +++++++-------- ApplicationCode/UserInterface/RiuTools.cpp | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ApplicationCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp index 9f947331c3..abd4d7f789 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp @@ -127,16 +127,15 @@ void RicShowPlotDataFeature::showTabbedTextWindow(const QString& title, std::fun RiuPlotMainWindow* plotwindow = RiaApplication::instance()->mainPlotWindow(); CVF_ASSERT(plotwindow); - RiuShowTabbedPlotDataDialog* textWiget = new RiuShowTabbedPlotDataDialog(); - textWiget->setMinimumSize(800, 600); + RiuShowTabbedPlotDataDialog* textWidget = new RiuShowTabbedPlotDataDialog(); + textWidget->setMinimumSize(800, 600); - textWiget->setWindowTitle(title); - textWiget->setDescription(title); - textWiget->setTextProvider(textProvider); + textWidget->setWindowTitle(title); + textWidget->setDescription(title); + textWidget->setTextProvider(textProvider); + textWidget->show(); - textWiget->show(); - - plotwindow->addToTemporaryWidgets(textWiget); + plotwindow->addToTemporaryWidgets(textWidget); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/UserInterface/RiuTools.cpp b/ApplicationCode/UserInterface/RiuTools.cpp index 2d7ced7be0..d168734ae8 100644 --- a/ApplicationCode/UserInterface/RiuTools.cpp +++ b/ApplicationCode/UserInterface/RiuTools.cpp @@ -23,7 +23,7 @@ //-------------------------------------------------------------------------------------------------- Qt::WindowFlags RiuTools::defaultDialogFlags() { - Qt::WindowFlags f = Qt::WindowTitleHint | Qt::WindowSystemMenuHint; + Qt::WindowFlags f = Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint; return f; }