Details
Description
Python 3.8.1, pyside2 5.14
In QT Designer I created for example QMainWindow and one QTableWidget in it with some columns and rows.
after pyside2-uic process I got (fragment):
self.tableWidget = QTableWidget(self.centralwidget) if (self.tableWidget.columnCount() < 4) self.tableWidget.setColumnCount(4) __qtablewidgetitem = QTableWidgetItem()
So there is SyntaxError: invalid syntax in second row (no colon)
One more bug:
I have .ui file with QFrames with same name.
After pyside2-uic I got a correct error, but not in console - directly in .py file (end fragment):
___qtablewidgetitem35.setText(QCoreApplication.translate("MainWindow", u"Ok", None)); # retranslateUi Error: mainwindow1.ui: Warning: The name 'frame' (QFrame) is already in use, defaulting to 'frame1'. mainwindow1.ui: Warning: The name 'frame' (QFrame) is already in use, defaulting to 'frame2'. mainwindow1.ui: Warning: The name 'frame' (QFrame) is already in use, defaulting to 'frame3'. mainwindow1.ui: Warning: The name 'frame' (QFrame) is already in use, defaulting to 'frame4'. mainwindow1.ui: Warning: The name 'frame' (QFrame) is already in use, defaulting to 'frame5'. mainwindow1.ui: Warning: The name 'frame' (QFrame) is already in use, defaulting to 'frame6'. while executing 'c:\python381\lib\site-packages\PySide2\uic -g python mainwindow1.ui'
Also, instead of UTF-8 text (russian) I got unicode:
#if QT_CONFIG(tooltip) self.btnAlerts.setToolTip(QCoreApplication.translate("MainWindow", u"\u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a \u0442\u0440\u0435\u0432\u043e\u0433", None)) #endif // QT_CONFIG(tooltip) self.btnAlerts.setText(QCoreApplication.translate("MainWindow", u"\u0422\u0440\u0435\u0432\u043e\u0433\u0438", None)) #if QT_CONFIG(tooltip)
In pyside 5.13 there was normal utf-8.