diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-06-28 08:57:47 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-28 08:57:47 -0700 |
commit | 413c276258997bbb71ccdc20b6b328a58b9d8851 (patch) | |
tree | 972ab01a0aa703015fb6a6a5318b11cf2347f34d | |
parent | 3179e0f7220c2f792c139d5aa33fdd58b0d19b38 (diff) | |
download | subsurface-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.cpp | 4 |
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); |