I am new to QT. I need to use threads for some purpose. I searched a lot about threading in QT but all the articles and videos are using same example. They are using dialog and putting a label with 2 buttons to print some data on label. I want to use threads with MainWindow. My application include reading a serial data and then displaying the related information on a label. That information contains a string and an audio file. String and audio file needs to be played at the same time. I have a connected a signal for serial read like below:
connect(&Serial, SIGNAL(readyRead()), this, SLOT(SerialRead()));
QString MainWindow::SerialRead()
{
word Words; //
QString serialData = Serial.readAll(); //Reading Serial Data
//Now here I want to start the two threads
//Thread 1 to display string
//Thread 2 to play audio
return 0;
}
How can I achieve above task. Can anyone please refer me to some usefull links or articles. Thanks