user14618630
user14618630

Reputation:

How to give glass effect to the background in pyqt5 without background image

I have made an application using pyqt5 and I want to give a glass effect in it's background without background image. How to do this?

Upvotes: 1

Views: 382

Answers (1)

SimoN SavioR
SimoN SavioR

Reputation: 604

I guess you want this ==> setWindowOpacity

from PyQt5.QtWidgets import *


class main(QMainWindow):
    def __init__(self):
        super().__init__()

        self.setWindowOpacity(0.5)

        self.resize(320,250)
        self.show()        


app = QApplication([])
window = main()
app.exec()

Upvotes: 0

Related Questions