summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2022-05-20 22:35:59 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-05-21 19:25:32 +0200
commit51654fb62f09ff5a32b8c4133f3ee40337ae2e76 (patch)
tree542aa83d8c68dbf7468f1218850b56b263bdb4c9 /examples
parent07ce95a6094ced5c2a718255d663a6c67d0f26b7 (diff)
Prepare boundary hint in QTextToSpeech
Add enum class BoundaryHint in QTextToSpeech. Add respective parameters in stop() and pause(). Update documentation, and implement support on macOS and iOS engines. Change-Id: I616a8763520e197c3bf16118c111c3e114079b38 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples')
-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);