Avatar ·

Pyqt5 window with a transparent background

📁 python, пример, работа

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

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

Example of code:

   from   PyQT5.QTWIDGETS  Import  qpplication, QWIDGET  from  pyqt5  Importcore  class   example  ( qwidget ):   def   __ Init __  ( self ):   super  () .__ Init __ ()  self.initui ()   def   initui  ( self ):  self.setgeometry ( 300 ,  300 ,  300 ,  220 )  self.setwindowtitle ( '' example ')   Self.Settrt and class = ""> '' __ main __ ':   import  sys app = qpplication (sys.argv)  ex = example ()  ex theyslo ()  ()  sys.exit (app.exec _ ())