Let's get started by preforming the following steps:
- Create a new Qt Widgets Application project. Then, go to File | New File or Project... and create a C++ Class:
- After that, name the new class MyWorker and make it inherit from the QObject class. Don't forget to include the QObject class by default as well:
- Once you have created the MyWorker class, open up myworker.h and add the following headers at the top:
#include <QObject>#include <QDebug>
- After that, add the following signals and slot functions to the file as well: ...