[Development] Removing the global static QObject from QPixmapCache
Lorn Potter
lorn.potter at gmail.com
Sun May 30 22:37:24 CEST 2021
On 30/5/21 3:28 PM, Sze Howe Koh wrote:
> This also causes problems when the QGuiApplication is created in a
> std::thread instead of in main() (e.g. when a non-Qt application loads
> a Qt-based plugin to display a GUI) -- The QPMCache destructor is run
> by the wrong thread, which produces a warning, " QObject::~QObject:
> Timers cannot be stopped from another thread ". There are also reports
> that this can cause crashes [3][4].
ooooh ya, this sounds familiar. I have seen this before when I was
working on wasm pthread support and trying out emscripten's
PROXY_TO_PTHREAD, which moves the main() function to a thread to leave
the main browser thread to do other things so it never blocks.
--
Lorn Potter
Freelance Qt Developer. Platform Maintainer Qt WebAssembly, Maintainer
QtSensors
Author, Hands-on Mobile and Embedded Development with Qt 5
More information about the Development
mailing list