Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qshortcut_widgets.cpp File Reference

(cd4000a97d325029acab7c253c1774c01ad6f782)

#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>
+ Include dependency graph for qshortcut_widgets.cpp:

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)
 

Function Documentation

◆ correctWidgetContext()

static bool correctWidgetContext ( Qt::ShortcutContext context,
QWidget * w,
QWidget * active_window )
static

Definition at line 101 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 * >(), qobject_cast< QWindow * >(), and QShortcutPrivate::simpleContextMatcher().

Referenced by QtWidgetsShortcutPrivate::contextMatcher(), QWidget::grabShortcut(), and QGraphicsWidget::grabShortcut().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: