my project crash with this error:Could not parse stylesheet of object QFrame(0x3e7b620)
Unsolved
Qt for Python
-
I use pyqt5 in my project and want to have a Circular Progress Bar in it.
I use this video Modern GUI - Python, Qt Designer and PySide2 - Circular Progress Bar/Preloader .it works currently but when I send data every second for this method throw mqtt, it crashed and this error disappear ":Could not parse stylesheet of object QFrame(0x3e7b620)" then the project is closed.
my code is:def tempratureBarValue(self, value): styleSheet = """ border-radius:90px; background-color: qconicalgradient(cx:0.5, cy:0.5, angle:90, stop: {stop_1} rgba(255, 85, 255, 0), stop: {stop_2} rgba(253, 54, 11, 80)); """ progress = (100 - value) / 100.0 # get new value stop_1 = str(progress - 0.001) stop_2 = str(progress) # replace styleSheetNew = styleSheet.replace("{stop_1}", stop_1).replace("{stop_2}", stop_2) # set new stylesheet self.ui.label_temperature.setText(QCoreApplication.translate("MainWindow", str(value), None)) self.ui.circularProgressT.setStyleSheet(styleSheetNew)
I don't know what am I doing :l