![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include "qquickshortcut_p.h"
#include <QtQuick/qquickitem.h>
#include <QtQuick/qquickwindow.h>
#include <QtQuick/qquickrendercontrol.h>
#include <QtQuick/private/qtquickglobal_p.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtQml/qqmlinfo.h>
#include "moc_qquickshortcut_p.cpp"
Go to the source code of this file.
Typedefs | |
typedef bool(* | ContextMatcher) (QObject *, Qt::ShortcutContext) |
Functions | |
static QT_BEGIN_NAMESPACE bool | qQuickShortcutContextMatcher (QObject *obj, Qt::ShortcutContext context) |
\qmltype Shortcut \nativetype QQuickShortcut \inqmlmodule QtQuick | |
Q_QUICK_EXPORT ContextMatcher | qt_quick_shortcut_context_matcher () |
Q_QUICK_EXPORT void | qt_quick_set_shortcut_context_matcher (ContextMatcher matcher) |
static QKeySequence | valueToKeySequence (const QVariant &value, const QQuickShortcut *const shortcut) |
static QList< QKeySequence > | valueToKeySequences (const QVariant &value) |
typedef bool(* ContextMatcher)(QObject *, Qt::ShortcutContext) |
Definition at line 79 of file qquickshortcut.cpp.
|
static |
\qmltype Shortcut \nativetype QQuickShortcut \inqmlmodule QtQuick
Provides keyboard shortcuts.
The Shortcut type lets you handle keyboard shortcuts. The shortcut can be set to one of the \l{QKeySequence::StandardKey}{standard keyboard shortcuts}, or it can be described with a string containing a sequence of up to four key presses that are needed to \l{Shortcut::activated}{activate} the shortcut.
\qml Item { id: view
property int currentIndex
Shortcut { sequences: [StandardKey.NextChild] onActivated: view.currentIndex++ } } \endqml
It is also possible to set multiple shortcut \l sequences, so that the shortcut can be \l activated via several different sequences of key presses.
\qmlsignal QtQuick::Shortcut::activated()
This signal is emitted when the shortcut is activated.
\qmlsignal QtQuick::Shortcut::activatedAmbiguously()
This signal is emitted when the shortcut is activated ambigously, meaning that it matches the start of more than one shortcut.
Definition at line 60 of file qquickshortcut.cpp.
Q_QUICK_EXPORT void qt_quick_set_shortcut_context_matcher | ( | ContextMatcher | matcher | ) |
Definition at line 88 of file qquickshortcut.cpp.
Q_QUICK_EXPORT ContextMatcher qt_quick_shortcut_context_matcher | ( | ) |
Definition at line 83 of file qquickshortcut.cpp.
|
static |
Definition at line 94 of file qquickshortcut.cpp.
|
static |
Definition at line 112 of file qquickshortcut.cpp.