Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Prevent minimize window when click Show Desktop
QtWS25 Last Chance

Prevent minimize window when click Show Desktop

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 2.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stucremon
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      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.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved