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): =True
import threading, time, sysdef loop(): while True: print(""text"") time.sleep(10)threading.Thread(target=loop, daemon=True).start()sys.exit() Log in to leave an answer