squawk/ui/widgets/settings/settings.cpp

25 lines
508 B
C++
Raw Normal View History

2022-01-16 19:54:57 +00:00
#include "settings.h"
#include "ui_settings.h"
Settings::Settings(QWidget* parent):
QWidget(parent),
m_ui(new Ui::Settings())
{
m_ui->setupUi(this);
connect(m_ui->list, &QListWidget::currentItemChanged, this, &Settings::onCurrentPageChanged);
2022-01-16 19:54:57 +00:00
}
Settings::~Settings()
{
}
void Settings::onCurrentPageChanged(QListWidgetItem* current)
{
if (current != nullptr) {
m_ui->header->setText(current->text());
m_ui->content->setCurrentIndex(m_ui->list->currentRow());
}
}