diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-10-27 10:22:31 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-10-29 12:46:32 (GMT) |
commit | dd5ec222ce0285bd9419c9a47a8329bda41b5dd8 (patch) | |
tree | 46c10ff6e4f6237a659acb67817298016fdaf975 /demos | |
parent | e78a4b092c86e56099dbed3c3f423028506129d5 (diff) | |
download | Qt-dd5ec222ce0285bd9419c9a47a8329bda41b5dd8.zip Qt-dd5ec222ce0285bd9419c9a47a8329bda41b5dd8.tar.gz Qt-dd5ec222ce0285bd9419c9a47a8329bda41b5dd8.tar.bz2 |
Set SpectrumAnalyserThread parent to 0 before calling moveToThread()
QObjects with a parent cannot be moved to a different thread.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/spectrum/app/spectrumanalyser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/demos/spectrum/app/spectrumanalyser.cpp b/demos/spectrum/app/spectrumanalyser.cpp index 1cc47a6..2fa17b1 100644 --- a/demos/spectrum/app/spectrumanalyser.cpp +++ b/demos/spectrum/app/spectrumanalyser.cpp @@ -64,6 +64,8 @@ SpectrumAnalyserThread::SpectrumAnalyserThread(QObject *parent) #endif { #ifdef SPECTRUM_ANALYSER_SEPARATE_THREAD + // moveToThread() cannot be called on a QObject with a parent + setParent(0); moveToThread(m_thread); m_thread->start(); #endif |