bug fixes
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "systemsettingform.h"
|
||||
#include "AccountTableForm.h"
|
||||
#include "event/EventCenter.h"
|
||||
#include "aboutwidget.h"
|
||||
|
||||
AdminSettingForm::AdminSettingForm(QWidget* parent, Qt::WindowFlags f) : TabFormWidget(parent) {
|
||||
|
||||
@@ -28,7 +29,7 @@ AdminSettingForm::AdminSettingForm(QWidget* parent, Qt::WindowFlags f) : TabForm
|
||||
widget->setFixedWidth(250);
|
||||
QStringList menus;
|
||||
//menus << tr("General") << tr("Account") << tr("System") << tr("Information") << tr("Log") << tr("About");
|
||||
menus << tr("General") << tr("Account") << tr("System") << tr("Information") << tr("About");
|
||||
menus << tr("General") << tr("Account") << tr("System") << tr("About");
|
||||
widget->addItems(menus);
|
||||
widget->setSpacing(3);
|
||||
for (int i = 0; i < menus.count(); ++i) {
|
||||
@@ -58,29 +59,32 @@ AdminSettingForm::AdminSettingForm(QWidget* parent, Qt::WindowFlags f) : TabForm
|
||||
//systemSetting->setText("systemSetting");
|
||||
//stackedWidget->addWidget(systemSetting);
|
||||
|
||||
QLabel* Info = new QLabel(this);
|
||||
Info->setText("info");
|
||||
stackedWidget->addWidget(Info);
|
||||
//QLabel* Info = new QLabel(this);
|
||||
//Info->setText("info");
|
||||
//stackedWidget->addWidget(Info);
|
||||
|
||||
//UserOperationLogForm* operationLogForm = new UserOperationLogForm(this);
|
||||
//stackedWidget->addWidget(operationLogForm);
|
||||
|
||||
QLabel* about = new QLabel(this);
|
||||
about->setText(tr("About"));
|
||||
//QLabel* about = new QLabel(this);
|
||||
//about->setText(tr("About"));
|
||||
|
||||
AboutWidget* about = new AboutWidget(this);
|
||||
stackedWidget->addWidget(about);
|
||||
|
||||
|
||||
widget->setCurrentRow(0);
|
||||
connect(widget, &QListWidget::currentRowChanged, [=](int rowindex) {
|
||||
stackedWidget->setCurrentIndex(rowindex);
|
||||
});
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
QStringList menus2;
|
||||
menus2 << tr("General") << tr("Account") << tr("System") << tr("Information") << tr("About");
|
||||
menus2 << tr("General") << tr("Account") << tr("System") << tr("About");
|
||||
widget->clear();
|
||||
widget->addItems(menus2);
|
||||
for (int i = 0; i < menus.count(); ++i) {
|
||||
widget->item(i)->setTextAlignment(Qt::AlignCenter);
|
||||
}
|
||||
about->setText(tr("About"));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user