Add label if no network manager is found (#2718)

old-commit-hash: f96fb625d929701717670bbe7be8791aa204bf02
This commit is contained in:
grekiki
2020-12-10 19:04:19 +01:00
committed by GitHub
parent 89b03fa2ee
commit 3bc7286704
+6
View File
@@ -24,6 +24,12 @@ WifiUI::WifiUI(QWidget *parent, int page_length) : QWidget(parent), networks_per
try {
wifi = new WifiManager;
} catch (std::exception &e) {
QLabel* warning = new QLabel("Network manager is inactive!");
warning->setStyleSheet(R"(font-size: 65px;)");
QVBoxLayout* warning_layout = new QVBoxLayout;
warning_layout->addWidget(warning, 0, Qt::AlignCenter);
setLayout(warning_layout);
return;
}