Never create a QObject as a member: create it on the heap, instead. The reason is that a Qt objects are destroyed when their parent is destroyed. If class has a QObject member, then the destructor will try a double-free (which triggers a segfault).
Never create a QObject as a member: create it on the heap, instead. The reason is that a Qt objects are destroyed when their parent is destroyed. If class has a QObject member, then the destructor will try a double-free (which triggers a segfault).