I have several dialogs (XMLDialog) that are childs of others (proxy dialog and smtp assistant dialog called from another config dialog). So I have at least a child which is opening other childs. I really need them to be modal. I do it like I did in the last years for Windows, Mac and Linux (GTK), but with QT subsystem I observe strange things.
Sometimes the child dialogue simply does not open up. Sometimes it takes a few seconds. It is not always the same. Sometimes, a new start of the app changes everything. In some cases it works as expected.
It seems better if I dont use DisableWindow() to disable the parent window. Without, it seems much more stable. But then the parent is editable, which is not good at all.
Sadly, I was not able to create a reproducing piece of code. As long as it I test with small things, it seem to work fine. But in a bigger project it starts to become weird.
At one situation, it seem to no longer work if I enable DisableWindow() in another part of the code which is not even affected at all. But as soon as I remove the comment, it starts to behave strange again (most times window does not appear etc).
The same code is working fine on Windows, Mac and Linux without QT.
Anyone else having such strange behavior with trying to make modal things?
I found some similar posts, but that seems to be fixed with 5.72. My weird thing is not easy to reproduce and happens more random
If I replace DisableWindow() with
Code: Select all
QtScript("window(" + Str(window) + ").setDisabled(true);")