Problem with QMainQindow Modal

  • Hi,

    I am using Qt 5.3.2 on my MAC OS X 10.10. When I compiled my old source code on Qt5, I faced a weird problem with MainWindow.

    Whenever I close any of its child of it's child, MainWindow comes on top.

    Let say A is MainWindow, B is its child and C is child of B.

    A lanuches B and B launches C. So the order is A at bottom, then comes B and then C at the top.

    When I close C, B goes behind A and A is now on top.

    The same program works good on Qt 4.8 and OS X 10.10. B remains on top after closing C.

    Please help me to fix this issue.

  • Moderators

    If B could, in your case, block A, then perhaps you can set it's flags to "Qt::WindowModal":

  • It didn't work either. A was non Modal. B was Window Modal and C was non Modal. Now in this situation, if I bring B on top by clicking it, C always remains behind B. It does not come up.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.