Skip to content
Qt 6.11 is out! See what's new in the release blog
  • QThread freezing the UI!

    General and Desktop qthread thread
    12
    0 Votes
    12 Posts
    9k Views
    JKSHJ
    Hi @rkhaotix, I had a quick look at your code. It's too big for me to go through properly, and I didn't spot anything obvious that maxes out your CPU. However, I noticed a few things which might be related: Your ModelExportHelper constructor is run in the main thread, so it opens the DB connection in the main thread. Are you sure you can use that connection in the worker thread after this? In line 56 of modelexportform.cpp: the lambda runs in the signalling (GUI) thread, not the worker thread. Note that, while the QThread manages the worker thread, the QThread object itself lives in the GUI thread. Your ModelExportHelper uses some GUI-related classes: QGraphicsView, QPixmap. These classes must only be used in the GUI thread. Your ModelExportHelper includes "modelwidget.h". Why? Widgets must only be used in the GUI thread.
  • 0 Votes
    5 Posts
    2k Views
    CAD_codingC
    I have shown only a simplified version of my code. Actually I have lots of networking happening serially and parallel. I transferred all of this to a new thread so as to keep my GUI thread free. Thanks for your advice!
  • QML and thread-safety

    QML and Qt Quick qml qqmlapplication thread qtquick
    5
    0 Votes
    5 Posts
    6k Views
    ?
    @JKSH said: The QQmlApplicationEngine runs code in the thread which constructed it. Thank you very much!
  • Multithread HTTP server

    General and Desktop http server thread pool
    7
    0 Votes
    7 Posts
    7k Views
    S
    Maybe my HTTP server library helps you: http://stefanfrings.de/qtwebapp/index-en.html It's multi-threaded.