diff --git a/YACReaderLibrary/server_config_dialog.cpp b/YACReaderLibrary/server_config_dialog.cpp index 4c7fdbcb..fba9aa9e 100644 --- a/YACReaderLibrary/server_config_dialog.cpp +++ b/YACReaderLibrary/server_config_dialog.cpp @@ -113,6 +113,13 @@ ServerConfigDialog::ServerConfigDialog(QWidget *parent) connect(check, &QCheckBox::stateChanged, this, &ServerConfigDialog::enableServer); } +void ServerConfigDialog::showEvent(QShowEvent *event) +{ + QDialog::showEvent(event); + + generateQR(); +} + void ServerConfigDialog::enableServer(int status) { QSettings *settings = new QSettings(YACReader::getSettingsPath() + "/YACReaderLibrary.ini", QSettings::IniFormat); // TODO unificar la creación del fichero de config con el servidor diff --git a/YACReaderLibrary/server_config_dialog.h b/YACReaderLibrary/server_config_dialog.h index 34e51c76..7d0e9cfa 100644 --- a/YACReaderLibrary/server_config_dialog.h +++ b/YACReaderLibrary/server_config_dialog.h @@ -13,6 +13,7 @@ class ServerConfigDialog : public QDialog Q_OBJECT public: ServerConfigDialog(QWidget *parent = 0); + void showEvent(QShowEvent *event) override; private: QComboBox *ip;