From da8ec5c60841a926874c9ef2c4fed0078d47ebc8 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 6 Dec 2015 06:20:56 +0100 Subject: gui/settings: set parent, otherwise not modal --- gui/options-dialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp index a7efdb75..e1324ccc 100644 --- a/gui/options-dialog.cpp +++ b/gui/options-dialog.cpp @@ -96,7 +96,7 @@ void OptionsDialog::bind_key(key_opts& kopts, QLabel* label) kopts.button = -1; kopts.guid = ""; kopts.keycode = ""; - QDialog d; + QDialog d(this); auto l = new QHBoxLayout; l->setMargin(0); KeyboardListener k; @@ -104,6 +104,7 @@ void OptionsDialog::bind_key(key_opts& kopts, QLabel* label) d.setLayout(l); d.setFixedSize(QSize(500, 300)); d.setWindowFlags(Qt::Dialog); + d.setWindowModality(Qt::ApplicationModal); connect(&k, &KeyboardListener::key_pressed, [&] (QKeySequence s) -> void { kopts.keycode = s.toString(QKeySequence::PortableText); kopts.guid = ""; -- cgit v1.2.3