App freeze problem

Hello everyone,

I am encountering a problem where my application becomes unresponsive when using a popup with an `OCCTQtViewer` widget. Here's how to reproduce the issue:

1. On the main page, there is a button that opens a subpage.
2. On the subpage, there is another button that opens a popup containing an `OCCTQtViewer`.
3. After opening the popup, close it.
4. Then close the subpage.
5. If you try to open the subpage again, the application becomes unresponsive.

I suspect the problem is related to setting the parent for the popup containing `OCCTQtViewer`.

To help illustrate the issue, I've attached a sample app: [GitHub - occt-samples-qopenglwidget](https://github.com/gkv311/occt-samples-qopenglwidget). My application's source code will also be attached for reference.

Any insights or suggestions would be greatly appreciated. Thanks in advance!

Attachments: