UpdateLayeredWindowIndirect failed when clicking on the menu icon
-
Been trying to run a file (named "propiedadesmain.py" that generates a window for graphic presentation purposes.
import os import sys import csv from propiedades import * from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5.QtGui import * from PyQt5.QtCore import * from Custom_Widgets.Widgets import * from functools import partial shadow_elements = { "left_menu","frame_3", "frame_5", "header", "frame_8"} class MainWindow(QMainWindow): def __init__(self,parent=None): QMainWindow.__init__(self) self.ui = Ui_MainWindow() self.ui.setupUi(self) self.setMinimumSize(850,600) loadJsonStyle(self, self.ui) for x in shadow_elements: effect = QtWidgets.QGraphicsDropShadowEffect(self) effect.setBlurRadius(18) effect.setXOffset(0) effect.setYOffset(0) effect.setColor(QColor(0,0,0,255)) getattr(self.ui,x).setGraphicsEffect(effect) self.show() if __name__ == "__main__": import sys app = QApplication(sys.argv) window = MainWindow() window.show() sys.exit(app.exec_())From the imports, it calls the "propiedades" file that was generated by QT Designer (converted the ui file into a python file) and acts as the base for the UI construction. It also calls a json file for additional style modification:
{ "QMainWindow":[ { "tittle":"AquaSense Analytics", "icon":":/icons/App/8993012.png", "frameless": true, "transluscentBg": true, "sizeGrip": "SIZEGRIP", "shadow":[{ "color": "#000", "blurRadius": 20, "xOffset": 0, "yOffset": 0, "centralWidget": "centralwidget" } ], "navigation":[ { "moveWindow": "header", "tittleBar": "header" } ] } ], "QStackedWidget":[ { "name":"stackedWidget_2", "transitionAnimation":[ { "slide":[{ "active": true, "duration":1000, "direction": "horizontal", "erasingCurve": "Linear" } ] } ], "navigation":[{ "navigationButtons":[ { "pushButton_5":"percentage_bar_chart", "pushButton": "nested_donuts", "pushButton_2": "temperature_charts", "pushButton_3": "line_charts", "pushButton_4": "bar_charts" } ] }] }], "QCustomSlideMenu": [{ "name":"left_menu", "defaultSize": [{ "width": 0, "height": "parent" }], "collapsedSize": [{ "width": 0, "height": "parent" }], "expandedSize": [{ "width": 250, "height": "parent" }], "toggleButton":[{ "buttonName": "pushButton_6", "icons": [{ "whenMenuIsCollapsed": ":/icons/App/image/left_menu.png", "whenMenuIsExpanded": ":/icon/3810964.png" }] }], "menuTransitionAnimation": [{ "animationDuration": 500, "animationEasingCurve": "Linear" }] }] }The Json file is especially used to add a function to the menu button: when pressed, it slides to the left and hides the buttons. When pressed again, it slides to the right and shows all the buttons. This is what it supposed to show:

However, as I run the file, the menu button seems to be bugged (as seen in these images):


Is there anyway to fix this? Whenever I click on the menu button, it sends an error saying "UpdateLayeredWindowIndirect failed for ptDst=(258, 56), size=(850x607), dirty=(881x627 -20, 0) (The parameter is incorrect.)". Additionally, in the mainpropiedades file, setGraphicsEffect is not highlighted like the rest of the functions:

I'm not sure if this porbably has something to do with error or not.