Fix crash problem while change language.

This commit is contained in:
sunwen
2024-04-26 13:42:41 +08:00
parent 2621262c6f
commit ab224b5092

View File

@@ -71,6 +71,11 @@ SettingFormWidget::SettingFormWidget(QWidget* aParent, Qt::WindowFlags f)
widget->setCurrentRow(0);
connect(widget, &QListWidget::currentRowChanged, [=](int rowindex)
{
if(rowindex < 0)
{
return;
}
if(widget->item(rowindex)->text() == tr("Help") && stackedWidget->widget(rowindex) == nullptr)
{
stackedWidget->addWidget(new HelpForm(ui->commandWidget));