summaryrefslogtreecommitdiffstats
path: root/examples/speech/hello_speak/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/speech/hello_speak/mainwindow.cpp')
-rw-r--r--examples/speech/hello_speak/mainwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/speech/hello_speak/mainwindow.cpp b/examples/speech/hello_speak/mainwindow.cpp
index 04c7a7f..5c15b1a 100644
--- a/examples/speech/hello_speak/mainwindow.cpp
+++ b/examples/speech/hello_speak/mainwindow.cpp
@@ -140,8 +140,8 @@ void MainWindow::engineSelected(int index)
setRate(ui.rate->value());
setPitch(ui.pitch->value());
setVolume(ui.volume->value());
- connect(ui.stopButton, &QPushButton::clicked, m_speech, &QTextToSpeech::stop);
- connect(ui.pauseButton, &QPushButton::clicked, m_speech, &QTextToSpeech::pause);
+ connect(ui.stopButton, &QPushButton::clicked, m_speech, [this]{ m_speech->stop(); });
+ connect(ui.pauseButton, &QPushButton::clicked, m_speech, [this]{ m_speech->pause(); });
connect(ui.resumeButton, &QPushButton::clicked, m_speech, &QTextToSpeech::resume);
connect(m_speech, &QTextToSpeech::stateChanged, this, &MainWindow::stateChanged);