Qt-学习记录04-按钮模拟按键

来源:互联网 发布:天谕捏脸数据男魔王 编辑:程序博客网 时间:2024/06/13 04:12

QCoreApplication::postEvent(m_textEdit, new QKeyEvent(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier, 0));
在你点击的槽函数中发送一个backspace给你的QTextEdit窗口

0 0