aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-28 08:57:47 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-28 08:57:47 -0700
commit413c276258997bbb71ccdc20b6b328a58b9d8851 (patch)
tree972ab01a0aa703015fb6a6a5318b11cf2347f34d
parent3179e0f7220c2f792c139d5aa33fdd58b0d19b38 (diff)
downloadsubsurface-413c276258997bbb71ccdc20b6b328a58b9d8851.tar.gz
Calendar Widget: make it modal
Also fix the setWindowFlags calls - those are not incremental, so you need to call the method once and combine the flags. I would also like ESC to close the calendar widget, but haven't figured out how to do that... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/simplewidgets.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index 9fe176c86..94670b04b 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -297,8 +297,8 @@ DateWidget::DateWidget(QWidget *parent) : QWidget(parent),
setDate(QDate::currentDate());
setMinimumSize(QSize(80,64));
setFocusPolicy(Qt::StrongFocus);
- calendarWidget->setWindowFlags(Qt::FramelessWindowHint);
- calendarWidget->setWindowFlags(Qt::WindowStaysOnTopHint);
+ calendarWidget->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
+ calendarWidget->setWindowModality(Qt::ApplicationModal);
calendarWidget->setFirstDayOfWeek(getLocale().firstDayOfWeek());
calendarWidget->setVerticalHeaderFormat(QCalendarWidget::NoVerticalHeader);