本页内容

Qt3DInput::QInputChord Class

class Qt3DInput::QInputChord

QInputChord 表示一组必须同时触发的QAbstractActionInput 。更多内容...

标题: #include <qinputchord.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dinput)
target_link_libraries(mytarget PRIVATE Qt6::3dinput)
qmake: QT += 3dinput
在 QML 中: InputChord
继承自: Qt3DInput::QAbstractActionInput
状态: 已弃用

该类已弃用。我们强烈建议不要在新代码中使用它。

属性

公共函数

QInputChord(Qt3DCore::QNode *parent = nullptr)
void addChord(Qt3DInput::QAbstractActionInput *input)
QList<Qt3DInput::QAbstractActionInput *> chords() const
void removeChord(Qt3DInput::QAbstractActionInput *input)
int timeout() const

公共槽位

void setTimeout(int timeout)

信号

void timeoutChanged(int timeout)

详细说明

属性文档

timeout : int

输入和弦中所有 QAbstractActionInput 必须在此时间范围内被触发。时间单位为毫秒。

访问函数:

int timeout() const
void setTimeout(int timeout)

通知器信号:

void timeoutChanged(int timeout)

成员函数文档

[explicit] QInputChord::QInputChord(Qt3DCore::QNode *parent = nullptr)

创建一个父对象为parent 的新QInputChord。

void QInputChord::addChord(Qt3DInput::QAbstractActionInput *input)

将 QAbstractActionInputinput 追加到此QInputChord 的和弦向量末尾。

另请参阅 removeChord 。

QList<Qt3DInput::QAbstractActionInput *> QInputChord::chords() const

返回QInputChord 的弦向量。

void QInputChord::removeChord(Qt3DInput::QAbstractActionInput *input)

从该QInputChord 的和弦向量中移除QAbstractActionInputinput 。

另请参阅 addChord 。

[slot] void QInputChord::setTimeout(int timeout)

将输入组合键中所有 QAbstractActionInput 必须在该时间范围内触发的时限设置为timeout 。时间单位为毫秒

注意: 这是属性timeout 的设置 函数。

另请参阅 timeout()。

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