[Python] How to enable back windows animations if I disabled the default windows frame with...

Discussão em 'Python' iniciado por Stack, Julho 19, 2025.

  1. Stack

    Stack Membro Participativo

    I disabled the window frame and made my own window frame, but it also removed all window animations when maximizing/minimizing or closing etc. How to enable them back without enabling the default windows frame?

    I used this: self.setWindowFlags(Qt.WindowType.FramelessWindowHint)

    I tryied doing stuff around with winAPI but it looks weird now

    hwnd = int(window.winId())

    user32 = ctypes.windll.user32
    style = user32.GetWindowLongW(hwnd, GWL_STYLE)

    style |= WS_CAPTION | WS_THICKFRAME
    user32.SetWindowLongW(hwnd, GWL_STYLE, style)

    user32.SetWindowPos(hwnd, 0, 0, 0, 0, 0, 0x0002 | 0x0001 | 0x0020)

    Continue reading...

Compartilhe esta Página