Details
Description
In short if i use snake_case and true_property in pyDBManager.py i get this error:
Traceback (most recent call last):
File "C:\PyWare\pyDBManager\Bug\pyDBManager.py", line 161, in <module>
window = MainWindow()
File "C:\PyWare\pyDBManager\Bug\pyDBManager.py", line 56, in _init_
self.ui.setupUi(self)
File "C:\PyWare\pyDBManager\Bug\DBManagerMainWindowBad.py", line 132, in setupUi
self.gridLayout.setContentsMargins(0, 0, 0, 0)
AttributeError: 'PySide6.QtWidgets.QGridLayout' object has no attribute 'setContentsMargins'. Did you mean: 'getContentsMargins'?
I attached 7 files:
DBManagerMainWindowGood.ui created with QtDesigner
DBManagerMainWindowBad.ui same file with some extra widgets
DBManagerMainWindowGood.py and DBManagerMainWindowBad.py are generated from pyside6-uic using the batch file.
PyDBManager.py has an optional import line:
#from DBManagerMainWindowGood import Ui_DBManagerMainWindow
from DBManagerMainWindowBad import Ui_DBManagerMainWindow
When i import the DBManagerMainWindowBad.py file i get the error shown. If i use the DBManagerMainWindowGood.py everithing works.
BUT if i use the PyDBManagerB.py script both import works correctly. The only difference is that the PyDBManagerB.py is not using snake_case and true_property.