QKeyCombination Class
Die Klasse „QKeyCombination“ speichert eine Tastenkombination aus einer Taste und optionalen Modifikatortasten. Mehr...
| Header: | #include <QKeyCombination> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| Seit: | Qt 6.0 |
Vergleiche mit QKeyCombination
| Kategorie | Vergleichbare Typen |
|---|---|
| Gleichheit | QKeyCombination |
Öffentliche Funktionen
| QKeyCombination(Qt::Key key = Qt::Key_unknown) | |
| QKeyCombination(Qt::KeyboardModifiers modifiers, Qt::Key key = Qt::Key_unknown) | |
| QKeyCombination(Qt::Modifiers modifiers, Qt::Key key = Qt::Key_unknown) | |
| Qt::Key | key() const |
| Qt::KeyboardModifiers | keyboardModifiers() const |
| int | toCombined() const |
Statische öffentliche Mitglieder
| QKeyCombination | fromCombined(int combined) |
Verwandte Nicht-Mitglieder
| size_t | qHash(QKeyCombination key, size_t seed = 0) |
| bool | operator!=(const QKeyCombination &lhs, const QKeyCombination &rhs) |
| QDataStream & | operator<<(QDataStream &out, QKeyCombination combination) |
| QDebug | operator<<(QDebug debug, QKeyCombination combination) |
| bool | operator==(const QKeyCombination &lhs, const QKeyCombination &rhs) |
| QDataStream & | operator>>(QDataStream &in, QKeyCombination &combination) |
| QKeyCombination | operator|(Qt::Key key, Qt::KeyboardModifier modifier) |
| QKeyCombination | operator|(Qt::Key key, Qt::KeyboardModifiers modifiers) |
| QKeyCombination | operator|(Qt::Key key, Qt::Modifier modifier) |
| QKeyCombination | operator|(Qt::Key key, Qt::Modifiers modifiers) |
| QKeyCombination | operator|(Qt::KeyboardModifier modifier, Qt::Key key) |
| QKeyCombination | operator|(Qt::KeyboardModifiers modifiers, Qt::Key key) |
| QKeyCombination | operator|(Qt::Modifier modifier, Qt::Key key) |
| QKeyCombination | operator|(Qt::Modifiers modifiers, Qt::Key key) |
Ausführliche Beschreibung
Die Klasse „QKeyCombination“ kann verwendet werden, um eine Kombination aus einer Taste und null oder mehr Tastaturmodifikatoren darzustellen.
Siehe auch „ QKeySequence “.
Dokumentation der Mitgliedsfunktionen
[constexpr noexcept] QKeyCombination::QKeyCombination(Qt::Key key = Qt::Key_unknown)
Erstellt ein QKeyCombination-Objekt, das die Tastenkombination „ key “ ohne Modifikatortasten darstellt.
Siehe auch ` key()`.
[explicit constexpr noexcept] QKeyCombination::QKeyCombination(Qt::KeyboardModifiers modifiers, Qt::Key key = Qt::Key_unknown)
Erstellt ein QKeyCombination-Objekt, das die Kombination aus key mit den Modifikatoren modifiers darstellt.
Siehe auch „ key()“ und „ keyboardModifiers()“.
[explicit constexpr noexcept] QKeyCombination::QKeyCombination(Qt::Modifiers modifiers, Qt::Key key = Qt::Key_unknown)
Erstellt ein QKeyCombination-Objekt, das die Kombination aus key mit den Modifikatoren modifiers darstellt.
Siehe auch „ key()“ und „ keyboardModifiers()“.
[static constexpr] QKeyCombination QKeyCombination::fromCombined(int combined)
Erstellt ein „ QKeyCombination “-Objekt, indem der Schlüssel und die Modifikatoren aus „ combined “ extrahiert werden, wobei „ “ das Ergebnis einer bitweisen ODER-Verknüpfung zwischen einem Wert vom Typ „ Qt::Key “ und einem Wert vom Typ „ Qt::KeyboardModifiers “ sein muss. Mit „ toCombined()“ können gültige Werte für „ combined “ erzeugt werden.
Siehe auch ` toCombined()`.
[constexpr noexcept] Qt::Key QKeyCombination::key() const
Gibt den Schlüssel zurück, der durch dieses „ QKeyCombination “-Objekt dargestellt wird.
Siehe auch keyboardModifiers().
[constexpr noexcept] Qt::KeyboardModifiers QKeyCombination::keyboardModifiers() const
Gibt die Tastaturmodifikatoren zurück, die durch dieses „ QKeyCombination “-Objekt dargestellt werden.
Siehe auch ` key()`.
[constexpr noexcept] int QKeyCombination::toCombined() const
Gibt einen ganzzahligen Wert zurück, der durch bitweises ODER der Werte von key() und keyboardModifiers() erhalten wird, die durch dieses Objekt repräsentiert werden. Aus dem zurückgegebenen ganzzahligen Wert kann mithilfe von fromCombined() ein QKeyCombination -Objekt erstellt werden.
Siehe auch fromCombined(), key() und keyboardModifiers().
Verwandte Nicht-Mitglieder
[constexpr noexcept] size_t qHash(QKeyCombination key, size_t seed = 0)
Gibt den Hash-Wert für „ key “ zurück, wobei „ seed “ als Startwert für die Berechnung verwendet wird.
[constexpr noexcept] bool operator!=(const QKeyCombination &lhs, const QKeyCombination &rhs)
Gibt „ true “ zurück, wenn „ lhs “ und „ rhs “ unterschiedliche Kombinationen aus Taste und Modifikatortasten aufweisen; andernfalls „ false “.
QDataStream &operator<<(QDataStream &out, QKeyCombination combination)
Schreibt die Kombination „ combination “ in den Stream „ out “. Gibt „ out “ zurück.
Siehe auch „Serialisierung vonQt-Datentypen“.
QDebug operator<<(QDebug debug, QKeyCombination combination)
Schreibt die Kombination „ combination “ zu Debugging-Zwecken in das Debug-Objekt „ debug “.
Siehe auch „Debugging-Techniken“.
[constexpr noexcept] bool operator==(const QKeyCombination &lhs, const QKeyCombination &rhs)
Gibt „ true “ zurück, wenn „ lhs “ und „ rhs “ dieselbe Kombination aus Schlüssel und Modifikatoren aufweisen, andernfalls „ false “.
QDataStream &operator>>(QDataStream &in, QKeyCombination &combination)
Liest die Kombination „ combination “ aus dem Stream „ in “. Gibt „ in “ zurück.
Siehe auch „Serialisierung vonQt-Datentypen“.
[constexpr noexcept] QKeyCombination operator|(Qt::Key key, Qt::KeyboardModifier modifier)
[constexpr noexcept] QKeyCombination operator|(Qt::Key key, Qt::Modifier modifier)
[constexpr noexcept] QKeyCombination operator|(Qt::KeyboardModifier modifier, Qt::Key key)
[constexpr noexcept] QKeyCombination operator|(Qt::Modifier modifier, Qt::Key key)
Gibt ein „ QKeyCombination “-Objekt zurück, das die Kombination aus „ key “ und dem Modifikator „ modifier “ darstellt.
[constexpr noexcept] QKeyCombination operator|(Qt::Key key, Qt::KeyboardModifiers modifiers)
[constexpr noexcept] QKeyCombination operator|(Qt::Key key, Qt::Modifiers modifiers)
[constexpr noexcept] QKeyCombination operator|(Qt::KeyboardModifiers modifiers, Qt::Key key)
[constexpr noexcept] QKeyCombination operator|(Qt::Modifiers modifiers, Qt::Key key)
Gibt ein „ QKeyCombination “-Objekt zurück, das die Kombination aus „ key “ und den Modifikatoren „ modifiers “ darstellt.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.