QWeakPointer rather, according to the docs.
bq. QWeakPointer can be used to track deletion of classes that derive from QObject, even if they are not managed by QSharedPointer. When used in that role, QWeakPointer replaces the older QPointer in all use-cases.
But the sentence that made me a little unsure was this:
bq. To obtain the QObject being tracked by QWeakPointer, you must use the QWeakPointer::data() function, but only if you can guarantee that the object cannot get deleted by another context. It should be noted that QPointer had the same constraint, so use of QWeakPointer forces you to consider whether the pointer is still valid.
What exactly is "context" in this context? Thread context? Doesn't make much sense, as QObjects cannot be used from different threads, anyway (which the following paragraph in the docs point out explicitly). So all I knew was that QWeakPointer does not protect me in some case, and I could not determine whether my case was this case.
Seemed safer to attach to the destroyed() signal.