bool WebWindow::eventFilter(QObject *watched, QEvent *event)
{
if (event->type() == QEvent::KeyPress && qApp->activeWindow() == this &&
watched->objectName() == QLatin1String("QMainWindowClassWindow")) {
search_edit_->lineEdit()->setFocus();
}
}
打字自上屏
最新推荐文章于 2023-01-31 16:53:39 发布