QInputEvent Class
La classe QInputEvent è la classe base per gli eventi che descrivono gli input dell'utente. Per saperne di più...
| Intestazione: | #include <QInputEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| Eredita da: | QEvent |
| Ereditato da: |
- Elenco di tutti i membri, compresi quelli ereditati
- QInputEvent fa parte delle classi di eventi.
Funzioni pubbliche
(since 6.0) const QInputDevice * | device() const |
| QInputDevice::DeviceType | deviceType() const |
| Qt::KeyboardModifiers | modifiers() const |
| quint64 | timestamp() const |
Funzioni protette
| QInputEvent(QInputEvent &&) | |
| QInputEvent & | operator=(QInputEvent &&) |
| QInputEvent & | operator=(const QInputEvent &other) |
Documentazione delle funzioni membro
[protected delete] QInputEvent::QInputEvent(QInputEvent &&)
Crea un'istanza di ` QInputEvent`. Questa funzione è stata eliminata.
[since 6.0] const QInputDevice *QInputEvent::device() const
Restituisce il dispositivo di origine che ha generato l'evento originale.
Nel caso di un evento sintetizzato, ad esempio un evento del mouse generato da un evento tattile, ` device() ` continua a restituire il dispositivo touchscreen, in modo da poter capire che non proviene da un mouse vero e proprio. Pertanto, ` mouseEvent.source()->type() != QInputDevice::DeviceType::Mouse ` è una possibile alternativa all'espressione di Qt 5 ` mouseEvent.source() == Qt::MouseEventSynthesizedByQt`.
Questa funzione è stata introdotta in Qt 6.0.
Vedi anche QPointerEvent::pointingDevice().
QInputDevice::DeviceType QInputEvent::deviceType() const
Restituisce il tipo di dispositivo che ha generato l'evento.
Qt::KeyboardModifiers QInputEvent::modifiers() const
Restituisce i flag dei modificatori della tastiera presenti immediatamente prima che si verificasse l'evento.
Vedi anche QGuiApplication::keyboardModifiers().
quint64 QInputEvent::timestamp() const
Restituisce il timestamp del sistema a finestre relativo a questo evento. Normalmente è espresso in millisecondi a partire da un punto temporale arbitrario, come ad esempio il momento in cui il sistema è stato avviato.
[protected delete] QInputEvent &QInputEvent::operator=(QInputEvent &&)
Assegna other a questa istanza di QInputEvent. Questa funzione viene eliminata.
[noexcept protected default] QInputEvent &QInputEvent::operator=(const QInputEvent &other)
Assegna “ other ” a questa istanza di “ QInputEvent ”.
© 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.