[PyQt6 6.11.0] QSplitterHandle wrapper invalidation stops after recreating QApplication

Phil Thompson phil at riverbankcomputing.com
Fri Sep 11 11:16:02 BST 2026


On 11/09/2026 05:16, 조주연 wrote:
> Hello,
> 
> I would like to report a deterministic QObject wrapper-invalidation
> difference after a QApplication is destroyed and a new QApplication is
> created later in the same Python process. Only one QApplication exists 
> at
> any time, and both are created on the main thread.
> 
> Before treating this as a bug, I would also like to clarify whether
> sequential QApplication lifetimes are supported by PyQt6.
> 
> Summary
> -------
> 
> The attached small, complete PyQt-only script creates QSplitter 
> objects,
> retains the Python wrappers returned by QSplitter.handle(1), deletes 
> each
> owning splitter, and then observes the wrappers with 
> PyQt6.sip.isdeleted().
> 
> It compares two modes, each run in a fresh Python process:
> 
> 1. single: both epochs use the same QApplication.
> 2. recreate: the first QApplication is fully destroyed before a second
>    QApplication is constructed.
> 
> Under a single QApplication, handle wrappers are invalidated in both
> epochs. After recreating QApplication, all handle destroyed slots are 
> still
> called under the second application, and all owning splitter wrappers 
> are
> marked deleted, but none of the retained handle wrappers are marked 
> deleted.

This should be fixed in the next snapshot.

Thanks,
Phil


More information about the PyQt mailing list