Delete widget immediately
I know this problem has been already discussed, and I know it has to do with the fact that deleteLater() only is effective after passing again control to the main loop.
Here there is my simple code:
How to switch from one layout to another layout in PyQt5 at runtime
Using the following process the following code fails.
Setup: