Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Blocking dialog without dimming/grayOut underlying Mainwindow



  • Is it somehow possible to have a dialog that is blocking (e.g. through a call of QDialog::exec()), so the Interaction with Mainwindow gets disabled however without dimming the underlying mainwindow?


  • Lifetime Qt Champion

    Hi,

    Why do you want to avoid the visual cue that tells your users that they won't be able to interact with the window while the dialog is opened ?



  • The application is as following:

    • In the mainwindow there are some graphs showing data.
    • The dialog allows to chose and run some algorithms that will change the data.
      Therefore the user should be able to directly see the effect of what she/he is doing in the dialog in the mainwindow.
      However it should not be possible to change anything in the mainwindow or open the dialog twice and things like that during the time the dialog is opened.

  • Lifetime Qt Champion

    @gde23
    Hi
    just tried on Windows 10 and Linux with xfce.
    I dont get any dimming effect so i did wonder on what platform are you seeing this ?



  • @mrjj
    Hi,
    I'm on Debian with KDE, however I think that when I've been to Windows the last time it looked something similar.
    Its not a huge effekt, but the Mainwindow is getting a bit darker, when calling dialog->exec(); and its not the case for dialog->show();


  • Lifetime Qt Champion

    @gde23
    Ok. I didnt see anything in Win 10. maybe 7 does.
    XFCE does not seem to do it but KDE might.

    I was/wanted checking if the controls would actually go into a disabled state as you could cheat and
    make that paint as normal for selected widgets but im not sure they actually do or who makes this dimmed effect.



  • OK, thx.
    I'll try on Win 10 then first so I can tell if the OS is the reason or there is something else to be considered.


  • Lifetime Qt Champion

    The other thing you can also do is to disable what should not be used while your dialog is opened.



  • @SGaist: Thanks for the hint,.
    That really might be a good idea, because I see the point why it is not supported by default.


Log in to reply