调试初版

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 -4
View File
@@ -41,7 +41,7 @@ HomePage::HomePage(AppContext* ctx, QWidget* parent)
leftLay->setSpacing(100);
auto addMenu = [&](const QString& t, PageId id) {
QPushButton* b = button(t, "", left);
b->setFixedSize(260, 100); // 固定尺寸(改这里同时调整 2 个菜单按钮)
b->setFixedSize(260, 120); // 固定尺寸(改这里同时调整 2 个菜单按钮)
b->setStyleSheet(menuBtnStyle);
connect(b, &QPushButton::clicked, this, [this, id]() { emit navigate(id); });
leftLay->addWidget(b, 0, Qt::AlignHCenter); // 不占拉伸因子,余量交给上下 stretch 均分
@@ -89,15 +89,15 @@ HomePage::HomePage(AppContext* ctx, QWidget* parent)
rightLay->setContentsMargins(0, 0, 0, 0);
rightLay->setSpacing(24);
QPushButton* debug = button("调试维护", "", right);
debug->setFixedSize(240, 100);
debug->setFixedSize(240, 120);
debug->setStyleSheet(actionBtnStyle);
connect(debug, &QPushButton::clicked, this, [this]() { emit navigate(PageDebug); });
QPushButton* help = button("操作说明", "", right);
help->setFixedSize(240, 100);
help->setFixedSize(240, 120);
help->setStyleSheet(actionBtnStyle);
connect(help, &QPushButton::clicked, this, &HomePage::onHelp);
QPushButton* spare = button("备用", "", right);
spare->setFixedSize(240, 100);
spare->setFixedSize(240, 120);
spare->setStyleSheet(actionBtnStyle);
spare->setEnabled(false); // 预留功能:置灰禁用,不接任何跳转
rightLay->addStretch(1);