- All Implemented Interfaces:
public class QThreadAffinityException extends RuntimeException
The QThreadAffinityException class is thrown when a QObject is used outside its own thread. Each QObject has thread affinity, a thread that it belongs to, which is accessible through its thread() method. Accessing an object from outside this thread is forbidden to avoid concurrency problems. Qt Jambi checks if threading affinity is violated in each member of each QObject subclass. It is possible to disable this check by setting the VM runtime parameter
(String message, QObject object, QThread expectedThread, QThread currentThread)Creates a new QThreadAffinityException with the given message, object and thread.
message- Describes the affinity exception.
object- The object that was accessed.
expectedThread- The expected thread.
currentThread- The thread from which the access was made.