I am using Python 3.9.1 and PyQt6. Now I want to create a window with blurred background, which should look something like below:
Blurred Window Background Demo
It would be helpful if anybody provide me a code for this.
I am using Python 3.9.1 and PyQt6. Now I want to create a window with blurred background, which should look something like below:
Blurred Window Background Demo
It would be helpful if anybody provide me a code for this.
the real deal:
python -m pip install BlurWindow
import sys
from PySide2.QtWidgets import *
from PySide2.QtCore import *
from BlurWindow.blurWindow import blur
class MainWindow(QWidget):
def __init__(self):
super(MainWindow, self).__init__()
self.setAttribute(Qt.WA_TranslucentBackground)
self.resize(500, 400)
blur(self.winId())
self.setStyleSheet("background-color: rgba(0, 0, 0, 0)")
if __name__ == '__main__':
app = QApplication(sys.argv)
mw = MainWindow()
mw.show()
sys.exit(app.exec_())
Well taken from KDE Plasma, its easy now to do this with Python.
For details, check this out - Watch this carefully
You will need to use the library provided called fluentapp -
For Project made with python - size 95 mb
You will need to extract it from the project and use the reference guide provided. I have already tried it its cool and enhances the beauty of your app.
Syntax is easy e.g. -
import fluentapp.pyqt6.windowtools as wingui
wingui.setWindowAlpha("0.5") # Make window transparent
wingui.addGaussianBlur(radius=20, cover= False)
#if you want to use additional layer for dark and light theme, you can set cover True for dark.
Your Code Here ----
© 2022 - 2024 — McMap. All rights reserved.