Avatar ·

Pyqt5 window with a transparent background

📁 Advanced Python Topics, example, work

I want to create a window that has a transparent background inside.

I tried all the options. I invariably get a black background. The option with the transparency of the whole window works, but does not suit, since visible frames and emptiness are needed.

Example code:


from PyQt5.QtWidgets import QApplication, QWidget
from PyQt5 import QtCore

class Example(QWidget):
    def __init__(self):
        super().__init__()