Try this way

This commit is contained in:
Mm2PL 2023-01-31 00:21:31 +01:00
parent 56c7e78f48
commit 4908efcf89
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9

View file

@ -39,7 +39,7 @@ PluginsPage::PluginsPage()
auto plgroup = groupLayout.emplace<QGroupBox>(plugin->meta.name); auto plgroup = groupLayout.emplace<QGroupBox>(plugin->meta.name);
auto pl = plgroup.setLayoutType<QFormLayout>(); auto pl = plgroup.setLayoutType<QFormLayout>();
auto *descrText = new QLabel(plugin->meta.description); auto *descrText = new QLabel(plugin->meta.description);
descrText->setTextFormat(Qt::TextFormat::MarkdownText); //descrText->setTextFormat(Qt::TextFormat::MarkdownText);
descrText->setWordWrap(true); descrText->setWordWrap(true);
descrText->setStyleSheet("color: #bbb"); descrText->setStyleSheet("color: #bbb");
pl->addRow(descrText); pl->addRow(descrText);
@ -50,8 +50,8 @@ PluginsPage::PluginsPage()
pl->addRow("Homepage", homepage); pl->addRow("Homepage", homepage);
auto *reload = new QPushButton("Reload"); auto *reload = new QPushButton("Reload");
QObject::connect(reload, &QPushButton::pressed, [=]() { QObject::connect(reload, &QPushButton::pressed, [name = codename]() {
getApp()->plugins->reload(codename); getApp()->plugins->reload(name);
}); });
pl->addRow(reload); pl->addRow(reload);
} }