![]() |
Qt 6.x
The Qt SDK
|
#include "qshortcut.h"
#include "private/qshortcut_p.h"
#include "private/qwidget_p.h"
#include <qevent.h>
#include <qapplication.h>
#include <private/qapplication_p.h>
#include <private/qshortcutmap_p.h>
#include <private/qwidgetwindow_p.h>
#include <qpa/qplatformmenu.h>
Go to the source code of this file.
Classes | |
class | QtWidgetsShortcutPrivate |
Functions | |
static QT_BEGIN_NAMESPACE bool | correctWidgetContext (Qt::ShortcutContext context, QWidget *w, QWidget *active_window) |
bool | qWidgetShortcutContextMatcher (QObject *object, Qt::ShortcutContext context) |
|
static |
Definition at line 104 of file qshortcut_widgets.cpp.
References Qt::ApplicationShortcut, context, QWidget::focusProxy(), QApplication::focusWidget(), QObjectPrivate::get(), QWidgetPrivate::get(), QWidget::isWindow(), menuBar, QWidget::parentWidget(), QMenuBar::platformMenuBar(), Qt::Popup, qDebug, Qt::SubWindow, Qt::Tool, QApplicationPrivate::tryModalHelper(), Qt::Widget, Qt::WidgetShortcut, Qt::WidgetWithChildrenShortcut, QWidget::window(), and QWidget::windowType().
Referenced by qWidgetShortcutContextMatcher().
bool qWidgetShortcutContextMatcher | ( | QObject * | object, |
Qt::ShortcutContext | context | ||
) |
Returns true
if the widget w is a logical sub window of the current top-level widget.
Definition at line 43 of file qshortcut_widgets.cpp.
References QApplication::activePopupWidget(), QApplication::activeWindow(), context, correctWidgetContext(), QGuiApplication::focusWindow(), Q_ASSERT_X, qobject_cast< QWidget * >(), and qobject_cast< QWindow * >().
Referenced by QtWidgetsShortcutPrivate::contextMatcher(), QWidget::grabShortcut(), and QGraphicsWidget::grabShortcut().