How to let Qt Application stay on desktop and translucent?

  • I want the application will remain on desktop when win+d pressed,and it is translucent.
    SetParent(w.winId(),desktopHwnd) can make Widget stay on desktop but if I use this function setWindowOpacity() won't work.
    How can i do it?

  • Have a look at this (don't worry about the frameless window part):

    Also, what do you mean remain on desktop? Do you mean, you don't want it to be able to minimize?

    If so, you can override the changeEvent(QEvent *event) in your window class and check if the window is being minimized, then show how ever which way you want it.

    For example:
    // change event (protected)
    void MainWindow::changeEvent(QEvent *event){
    if (event->type() == QEvent::WindowStateChange){
    if (isMinimized()) // check if the window is minimized

Log in to reply

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