调试初版

This commit is contained in:
xu
2026-10-14 18:22:41 +08:00
parent d3a355bd3f
commit e5efdea06e
26 changed files with 289 additions and 140 deletions
+4 -3
View File
@@ -49,11 +49,11 @@ PasswordMgmtLoginPage::PasswordMgmtLoginPage(AppContext* ctx, QWidget* parent)
btnRow->setSpacing(80);
btnRow->addStretch(1);
QPushButton* ok = button("确认", "", col);
ok->setFixedSize(160, 140);
ok->setFixedSize(160, 120);
ok->setStyleSheet("font-size:60px;");
connect(ok, &QPushButton::clicked, this, &PasswordMgmtLoginPage::onConfirm);
QPushButton* cancel = button("取消", "", col);
cancel->setFixedSize(160, 140);
cancel->setFixedSize(160, 120);
cancel->setStyleSheet(cancelButtonStyle(60)); // 选中时红底白字
connect(cancel, &QPushButton::clicked, this, &PasswordMgmtLoginPage::onCancel);
btnRow->addWidget(ok);
@@ -74,7 +74,8 @@ bool PasswordMgmtLoginPage::eventFilter(QObject* obj, QEvent* ev)
}
if (ev->type() == QEvent::KeyPress) {
QKeyEvent* ke = static_cast<QKeyEvent*>(ev);
if (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter) {
// 空格当“点击”:Tab 聚焦后按空格弹出数字键盘
if (Keys::space(ke->key())) {
onInputClicked();
return true;
}