QCustomSlideMenu conflicts with sizeGrip
siwuxei opened this issue · 3 comments
When using QCustomSlideMenu, when setting "height": "parent", sizeGrip will be wrong (at this time sizeGrip can only increase the height and not decrease the height), for example
"QCustomSlideMenu": [{
"name": "leftMenuContainer",
"defaultSize": [{
"width": 45,
"height": "auto"
}],
"collapsedSize": [{
"width": 45,
"height": "parent"
}],
"expandedSize": [{
"width": 150,
"height": "parent"
}],
how did you get to this point ? i wanted to add the styling using json file but i got an error, when not using the lines for the json style the script worked fine, i ll let you the error i'm getting hopping you ll help
File "c:\Users\Desktop\automatisation\main.py", line 17, in
window = MainWindow()
File "c:\UsersDesktop\automatisation\main.py", line 12, in init
loadJsonStyle(self, self.ui)
File "C:\Users\Programs\Python\Python39\lib\site-packages\Custom_Widgets\Widgets.py", line 1492, in loadJsonStyle
applyJsonStyle(self, self.ui, data)
File "C:\Users\Programs\Python\Python39\lib\site-packages\Custom_Widgets\Widgets.py", line 2104, in applyJsonStyle
containerWidget.customizeQCustomSlideMenu(
File "C:\Users\Programs\Python\Python39\lib\site-packages\Custom_Widgets\Widgets.py", line 1125, in customizeQCustomSlideMenu
self.refresh()
File "C:\Users\Programs\Python\Python39\lib\site-packages\Custom_Widgets\Widgets.py", line 1359, in refresh
if self.isExpanded():
File "C:\Users\Programs\Python\Python39\lib\site-packages\Custom_Widgets\Widgets.py", line 1375, in isExpanded
if self.width() > self.getCollapsedWidth() or self.width() > self.getCollapsedHeight():
TypeError: '>' not supported between instances of 'int' and 'NoneType'
If using auto size, make sure yo set the minimum or maximum size of the menu widget container to avoid such issues.