Important: Please read the Qt Code of Conduct -

QThread : Support for freeze

  • I made a gui that running QThread in it.
    When I run that within IDE like PyCharm, Eclipse, it works well.
    But, after freezing via PyInstaller, it fails to run in multi thread environ.
    According to what I searched for, in case of "multiprocessing" of Python it provides freeze_support() function.
    Does QThread provide supporting for freeze like PyInstaller, Py2exe, cx_freeze?

  • Lifetime Qt Champion

    @icapathos said in QThread : Support for freeze:

    I made a gui that running QThread in it.

    Using Qt?
    Qt GUI classes should only be used in main thread! Main thread is the one where QApplication:: exec() was called. Accessing Qt GUI classes in other threads than main thread is NOT supported!

  • Actually, I run GUI in main thread and just send signal from out of main thread.
    To add more details, I use QThread to walk down directories and gather sources, and then send signals to main GUI thread and create item in QListWidget.
    When I run the GUI within Esclipse, it works well.
    But, after freezing with PyInstaller and executing it, it looks like running only in main thread.

  • Lifetime Qt Champion

    @icapathos Well, without code one can only guess...

Log in to reply