QTextToSpeech/QSpeech doesn't work after export.
-
I am working on a project including the TextToSpeech module. My application works perfectly fine in the QT Creator but when I deploy it using my/path/to/windeployqt.exe . everything works except for the TextToSpeech part.
This is my only code from the TextToSpeech module.QT += core gui texttospeech multimediaQTextToSpeech speech; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { speech.setLocale(QLocale("en_US")); ui->setupUi(this); ui->correct->hide(); music = new QMediaPlayer(); }void MainWindow::sayWord() { example = list[i]; checked = false; speech.say(example); } -
Hi and welcome to devnet,
Did you check that all the dependencies of the module are deployed ?
On a side note, using a static QTextToSpeech object like that is wrong. QApplication should be the first QObject created as it does some internal initialisation.
-
@SGaist I fixed the problem of having the QTextToSpeech object like that by moving the object to the private section of the header file.
However, I want to check my deployment command line:windeployqt MyApp.exeFinally, how do I check that all the dependencies of the module are deployed?
-
@SGaist I fixed the problem of having the QTextToSpeech object like that by moving the object to the private section of the header file.
However, I want to check my deployment command line:windeployqt MyApp.exeFinally, how do I check that all the dependencies of the module are deployed?
@philfromflorida said in QTextToSpeech/QSpeech doesn't work after export.:
how do I check that all the dependencies of the module are deployed?
You can use https://lucasg.github.io/Dependencies/ tool