Avatar ·

PyQt5 Window with Transparent Background

📁 Advanced Python Topics, example, work

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

I've googled all options. I consistently get a black background. The option with full window transparency works, but it's not suitable because I need clearly visible window borders and emptiness inside.

Example code:

from PyQt5.QtWidgets import QApplication, QWidgetfrom PyQt5 import QtCoreclass Example(QWidget):    def __init__(self):        super().__init__()        self.initUI()    def initUI(self):