diff options
author | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2020-07-29 17:40:51 +0200 |
---|---|---|
committer | Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de> | 2020-07-29 17:40:51 +0200 |
commit | e6038135dffa857e49446d3c7107afd48c82abba (patch) | |
tree | 83549b51e6698629d804134e27d3c581ffc39d55 | |
parent | ec36fa958d13da26ad6e110e9306ea017f50ced8 (diff) | |
download | RWA.Support.DesktopApp-e6038135dffa857e49446d3c7107afd48c82abba.tar.gz RWA.Support.DesktopApp-e6038135dffa857e49446d3c7107afd48c82abba.tar.bz2 RWA.Support.DesktopApp-e6038135dffa857e49446d3c7107afd48c82abba.zip |
Make Toasts work properly
-rw-r--r-- | src/main_qmladaptor.cpp | 4 | ||||
-rw-r--r-- | src/main_qmladaptor.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main_qmladaptor.cpp b/src/main_qmladaptor.cpp index 9aafbce..620bb69 100644 --- a/src/main_qmladaptor.cpp +++ b/src/main_qmladaptor.cpp @@ -131,6 +131,10 @@ void MainQMLAdaptor::onCloseHandler() { emit onCloseSignal(); } +void MainQMLAdaptor::showToast(QString text, uint durationMs) { + emit showToastSignal(text, QString::number(durationMs)); +} + //void MainQMLAdaptor::onCloseHandler() { // qDebug() << "Inside MainQMLAdaptor::onCloseHandler()"; diff --git a/src/main_qmladaptor.h b/src/main_qmladaptor.h index 5cf2c9a..9ce6aa2 100644 --- a/src/main_qmladaptor.h +++ b/src/main_qmladaptor.h @@ -50,6 +50,8 @@ signals: void onCloseSignal(); + void showToastSignal(QString text, QString durationMs); + protected: QString _url; QString _pin; @@ -71,4 +73,6 @@ public slots: QString getPin(); void onCloseHandler(); + + void showToast(QString text, uint durationMs = 3000); }; |