summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtTabbable.cpp')
-rw-r--r--Swift/QtUI/QtTabbable.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Swift/QtUI/QtTabbable.cpp b/Swift/QtUI/QtTabbable.cpp
new file mode 100644
index 0000000..8473529
--- /dev/null
+++ b/Swift/QtUI/QtTabbable.cpp
@@ -0,0 +1,12 @@
+#include "QtTabbable.h"
+
+#include <QApplication>
+
+namespace Swift {
+
+bool QtTabbable::isWidgetSelected() {
+ /*isActiveWindow() shouldn't be necessary, but I don't trust it as far as I can throw it*/
+ return isActiveWindow() && isAncestorOf(QApplication::focusWidget());
+}
+
+}