QInputEvent Class
QInputEvent 클래스는 사용자 입력을 설명하는 이벤트의 기본 클래스입니다. 더 보기...
헤더: | #include <QInputEvent> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
상속합니다: | QEvent |
상속받습니다: |
- 상속된 멤버를 포함한 모든 멤버 목록
- QInputEvent는 이벤트 클래스의 일부입니다.
공용 함수
(since 6.0) const QInputDevice * | device() const |
QInputDevice::DeviceType | deviceType() const |
Qt::KeyboardModifiers | modifiers() const |
quint64 | timestamp() const |
멤버 함수 문서
[since 6.0]
const QInputDevice *QInputEvent::device() const
원래 이벤트를 생성한 소스 디바이스를 반환합니다.
예를 들어 터치 이벤트에서 생성된 마우스 이벤트와 같이 합성된 이벤트의 경우 device()
은 계속해서 터치스크린 장치를 반환하므로 실제 마우스에서 발생한 것이 아님을 알 수 있습니다. 따라서 mouseEvent.source()->type() != QInputDevice::DeviceType::Mouse
은 Qt 5 표현식 mouseEvent.source() == Qt::MouseEventSynthesizedByQt
을 대체할 수 있습니다.
이 함수는 Qt 6.0에 도입되었습니다.
QPointerEvent::pointingDevice()도 참조하십시오 .
QInputDevice::DeviceType QInputEvent::deviceType() const
이벤트를 생성한 디바이스 유형을 반환합니다.
Qt::KeyboardModifiers QInputEvent::modifiers() const
이벤트가 발생하기 직전에 존재했던 키보드 수정자 플래그를 반환합니다.
QGuiApplication::keyboardModifiers()도 참조하세요 .
quint64 QInputEvent::timestamp() const
이 이벤트에 대한 창 시스템의 타임스탬프를 반환합니다. 일반적으로 시스템이 시작된 시간 등 임의의 시점부터 밀리초 단위로 표시됩니다.
© 2025 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.