QKeySequenceEdit Class

Q키 시퀀스 편집 위젯을 사용하면 QKeySequence.. . 더 보기....

헤더: #include <QKeySequenceEdit>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
상속합니다: QWidget

속성

공용 기능

QKeySequenceEdit(QWidget *parent = nullptr)
QKeySequenceEdit(const QKeySequence &keySequence, QWidget *parent = nullptr)
virtual ~QKeySequenceEdit()
QList<QKeyCombination> finishingKeyCombinations() const
bool isClearButtonEnabled() const
QKeySequence keySequence() const
qsizetype maximumSequenceLength() const
void setClearButtonEnabled(bool enable)
void setFinishingKeyCombinations(const QList<QKeyCombination> &finishingKeyCombinations)

공용 슬롯

void clear()
void setKeySequence(const QKeySequence &keySequence)
void setMaximumSequenceLength(qsizetype count)

신호

void editingFinished()
void keySequenceChanged(const QKeySequence &keySequence)

재구현된 보호 기능

virtual bool event(QEvent *e) override
virtual void focusOutEvent(QFocusEvent *e) override
virtual void keyPressEvent(QKeyEvent *e) override
virtual void keyReleaseEvent(QKeyEvent *e) override
virtual void timerEvent(QTimerEvent *e) override

상세 설명

이 위젯은 사용자가 일반적으로 바로 가기로 사용되는 QKeySequence 을 선택할 수 있도록 합니다. 위젯이 포커스를 받으면 녹화가 시작되고 사용자가 마지막 키에서 손을 떼고 1초 후에 종료됩니다.

QKeySequenceEdit::keySequence도 참조하세요 .

속성 문서

[since 6.4] clearButtonEnabled : bool

이 속성은 키 시퀀스 편집이 비어 있지 않을 때 지우기 버튼을 표시할지 여부를 저장합니다.

활성화하면 키 시퀀스 편집에 일부 텍스트가 포함될 때 후행 지우기 버튼이 표시되고, 그렇지 않으면 줄 편집에 지우기 버튼이 표시되지 않습니다(기본값).

이 속성은 Qt 6.4에 도입되었습니다.

액세스 함수:

bool isClearButtonEnabled() const
void setClearButtonEnabled(bool enable)

[since 6.5] finishingKeyCombinations : QList<QKeyCombination>

이 속성에는 키 시퀀스 편집을 완료하는 키 조합 목록이 저장됩니다.

목록에 있는 모든 조합은 키 시퀀스 편집을 완료합니다. 다른 모든 키 조합은 키 시퀀스의 일부로 기록할 수 있습니다. 기본적으로 Qt::Key_TabQt::Key_Backtab 은 키 시퀀스 기록을 완료합니다.

이 속성은 Qt 6.5에 도입되었습니다.

액세스 함수:

QList<QKeyCombination> finishingKeyCombinations() const
void setFinishingKeyCombinations(const QList<QKeyCombination> &finishingKeyCombinations)

keySequence : QKeySequence

이 속성에는 현재 선택된 키 시퀀스가 포함됩니다.

바로가기는 사용자 또는 설정자 기능을 통해 변경할 수 있습니다.

참고: QKeySequencemaximumSequenceLength 속성보다 길면 키 시퀀스가 잘립니다.

기능에 액세스합니다:

QKeySequence keySequence() const
void setKeySequence(const QKeySequence &keySequence)

알림 신호:

void keySequenceChanged(const QKeySequence &keySequence)

[since 6.5] maximumSequenceLength : qsizetype

이 속성은 최대 시퀀스 길이를 보유합니다.

사용자가 입력할 수 있는 최대 키 시퀀스 수입니다. 값은 1에서 4 사이여야 하며 기본값은 4입니다.

이 프로퍼티는 Qt 6.5에 도입되었습니다.

액세스 함수:

qsizetype maximumSequenceLength() const
void setMaximumSequenceLength(qsizetype count)

멤버 함수 문서

[explicit] QKeySequenceEdit::QKeySequenceEdit(QWidget *parent = nullptr)

주어진 parent 으로 QKeySequenceEdit 위젯을 생성합니다.

[explicit] QKeySequenceEdit::QKeySequenceEdit(const QKeySequence &keySequence, QWidget *parent = nullptr)

주어진 keySequenceparent 로 QKeySequenceEdit 위젯을 생성합니다.

[virtual noexcept] QKeySequenceEdit::~QKeySequenceEdit()

QKeySequenceEdit 객체를 삭제합니다.

[slot] void QKeySequenceEdit::clear()

현재 키 시퀀스를 지웁니다.

[signal] void QKeySequenceEdit::editingFinished()

이 신호는 사용자가 단축키 입력을 완료하면 발산됩니다.

참고: 마지막 키에서 손을 떼고 이 신호를 내보내기까지 1초의 지연 시간이 있습니다.

[override virtual protected] bool QKeySequenceEdit::event(QEvent *e)

다시 구현합니다: QWidget::event(QEvent * 이벤트).

[override virtual protected] void QKeySequenceEdit::focusOutEvent(QFocusEvent *e)

다시 구현합니다: QWidget::focusOutEvent(QFocusEvent * 이벤트).

[override virtual protected] void QKeySequenceEdit::keyPressEvent(QKeyEvent *e)

다시 구현합니다: QWidget::keyPressEvent(QKeyEvent * 이벤트).

[override virtual protected] void QKeySequenceEdit::keyReleaseEvent(QKeyEvent *e)

다시 구현합니다: QWidget::keyReleaseEvent(QKeyEvent * 이벤트).

[override virtual protected] void QKeySequenceEdit::timerEvent(QTimerEvent *e)

다시 구현합니다: QObject::timerEvent(Q타이머이벤트 *이벤트).

© 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.