I think what happens is once you reload, the main window becomes active. Then calling raise and lower is raising and lower the main window (and its child) relative to the other windows in the OS. I just experimented and found that changing your onTopChildChanged handler as follows results in the desired behavior (at least under windows 7):
onChildOnTopChanged: {
if (childOnTop) {
winNew.requestActivate()
winNew.raise();
}
else {
winNew.requestActivate()
winNew.lower();
}
}
↧