Delete/Hide libraryButton if device is not WiFi-able

This commit is contained in:
Nicolas Mailloux 2021-12-30 20:37:39 -05:00
parent 9a309773d6
commit e310dd14b3

View file

@ -180,6 +180,12 @@ MainWindow::MainWindow(QWidget *parent)
ui->recentBooksLabel->hide(); ui->recentBooksLabel->hide();
// Deleting/Hiding "Library" button if device is not WiFi-able
if(global::device::isWifiAble == false && readFile("/opt/inkbox_device") != "emu\n") {
ui->libraryButton->deleteLater();
ui->line_10->deleteLater();
}
// Stylesheet // Stylesheet
QFile stylesheetFile(":/resources/eink.qss"); QFile stylesheetFile(":/resources/eink.qss");
stylesheetFile.open(QFile::ReadOnly); stylesheetFile.open(QFile::ReadOnly);