1
0
forked from BRT/arc

Daily commit

This commit is contained in:
slava 2025-07-27 16:11:43 +05:00
parent 9e67063946
commit ee6de4fc5a
2 changed files with 8 additions and 8 deletions

Binary file not shown.

View File

@ -25,8 +25,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
stackedWidget->setCurrentWidget(m_devicesWindow);
// FIXME переделать на ленивое создание
m_accountsWindow = new AccountWindow(this);
stackedWidget->addWidget(m_accountsWindow);
// m_accountsWindow = new AccountWindow(this);
// stackedWidget->addWidget(m_accountsWindow);
// stackedWidget->setCurrentWidget(accountPage);
resize(800, 600);
@ -34,10 +34,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
// Работа с меню
QMenu *menu = menuBar()->addMenu("Меню");
auto *devicesPageAction = new QAction("Активные устройства", this);
auto *accountPageAction = new QAction("Аккаунты", this);
// auto *accountPageAction = new QAction("Аккаунты", this);
auto *tutorialPageAction = new QAction("Инструкция", this);
menu->addAction(devicesPageAction);
menu->addAction(accountPageAction);
// menu->addAction(accountPageAction);
menu->addAction(tutorialPageAction);
connect(devicesPageAction, &QAction::triggered, this, [=]() {
@ -47,10 +47,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
stackedWidget->setCurrentWidget(m_devicesWindow);
});
connect(accountPageAction, &QAction::triggered, this, [=]() {
stackedWidget->setCurrentWidget(m_accountsWindow);
deleteDevicePage(); // освобождаем ресурсы
});
// connect(accountPageAction, &QAction::triggered, this, [=]() {
// stackedWidget->setCurrentWidget(m_accountsWindow);
// deleteDevicePage(); // освобождаем ресурсы
// });
connect(tutorialPageAction, &QAction::triggered, this, [=]() {
if (!m_tutorialWindow) {