Prevent minimize window when click Show Desktop



  • I have tried to make a window that continue show up after Show Desktop clicked.
    I have tried overload changeEvent function:
    @void mainwindow::changeEvent(QEvent *event)
    {
    if(event->type()==QEvent::WindowStateChange)
    {
    event->accept();
    showNormal();
    raise();
    }
    else
    QWidget::changeEvent(event);
    }@
    But this doesnt work
    So, how can I do that?


  • Moderators

    i'm not sure it thats possible at all...
    Do you mean for example in windows when you press WINDOWS-KEY+D?

    You can also try to remove the Qt::WindowMinimizeButtonHint from the window-widget's window flags property. At least this disables the widnow getting minimized by menu or the window button.



  • I don't know how to do it, but it's not a regular 'minimize'. The window seems to retain it's size, but is hidden somehow. I suspect you would have to dig into the windows API to solve this one.

    From a user's point of view, I would be very annoyed by an application that does not disappear on Windows-D, but that's just on a personal note.


Log in to reply
 

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