Important: Please read the Qt Code of Conduct -

Work around for a bug where window moves to the background

  • Hello all,

    I have this bug that has been difficult for me to solve. I have a feeling it is something simple but I am not sure what it is.

    I created a small program that demos the bug which can be downloaded here:

    I would upload to the forum directly but I do not have sufficient priviledges to do so.

    Anyways, in the demo, I have 2 forms. The first displays infomation to the user. The user is able to edit this info via a text box. When clicked on the text box, another screen comes up allowing to user to edit the value. On the second screen, if the user changes the value and then presses done, a modal pop up will come up prompting the user if they would like to save the value they entered.

    Now, here is where the bug happens. The second form decides to go in the background. This is an incorrect operation. What should happen is that the pop up comes up above the second window and the second window should remain above the first window until the user is finished.

  • Lifetime Qt Champion


    What version of Qt are you using ?
    On what OS is it happening ?

  • Lifetime Qt Champion

    Tested on Windows 10. The second form stays on top of first and "Confirm save" is on top.

  • Hello all,

    I am running the program on Linux. Specially Linux mint latest version as of this writing. I am using the version of Qt that comes with the distro which I believe is 5.9

  • Lifetime Qt Champion

    Can you check that with a more recent version of Qt ?
    The current LTS is 5.12.4 and latest release is 5.13.

  • @SGaist Hello,

    Thank you for your question. I have not checked with a more recent version of Qt simply becuase the project requirements dictate that I use Qt 5.9

  • Lifetime Qt Champion

    @Omni_Philm You still can try with newer Qt version to see whether it is a bug in Qt which already was fixed in a newer version. Then maybe you can find the bug in Qt bugtracker and apply the patch to Qt 5.9

Log in to reply