Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions

Multi-threaded application SIGSEGV while emitting signal



  • Hello, I have read a lot of links about multithreaded programming with QT, but was unable to create a stable application.
    I create all my threads like this:
    @
    ml = new ModuleLoader();
    QThread* t = new QThread();
    ml->moveToThread(t);
    connect(t, SIGNAL(started()), ml, SLOT(process()));
    connect(ml, SIGNAL(finished()), t, SLOT(quit()));
    connect(t, SIGNAL(finished()), t, SLOT(deleteLater()));
    t->start();
    @

    Please take a look at my code, it very simple, but I discouraged...

    source code:
    https://github.com/juanito14/testQThread


Log in to reply