python - How to make pyuic4 automatically set tabs to "MainWindow"? -


After adding a new label and text, edit in a grid above these tabs, when I ui.py with pyuic4 Generate file, it generates the following lines for many different tabs that gives errors about not having enough logic.

  self.tcTab.setTabText (self.tcTab.indexOf (self.tab_6),)  

Before I made changes though .ui fix this Will arise.

  self.tcTab.setTabText (self.tcTab.indexOf (self.tab_6), QtGui .QApplication.translate ("MainWindow", "", none, QtGui.QApplication.UnicodeUTF8))   

This code works fine, and if I edit this in ui.py filed your changes also work fine though I get it to automatically use when I use pyuic4 . Because what I think is that you should never edit the ui.py file. Thanks

EDIT: I did not take any advantage of everything. Any older changes that I do in the old UI file, will cause this problem if I use pyuic4 on it if it matters then qtDesigner has been translated into currentTabText under this function of the .py file What happens in:

  DEF retranslateUi (self, MainWindow): #these wrong people are generating pyuic4 self.tcTab.setTabText (self.tcTab.indexOf (self .tab_6),) Self.tcTab.setTabText (self.tcTab.indexOf (self.tab_9),) #these correct lines this self.tcTab.setTabText (self.tcTab.indexOf (self .tab_6), QtGui.QApplication.translate ("MainWinow", "", none, QtGui.QApplication.UnicodeUTF8)) self.tcTab.setTabText (self.tcTab.indexOf (self.tab_9) ), QtGui.QApplication.translate ("MainWindow", none, QtGui.QApplication.UnicodeUTF8))  

Edit2: Even when I open .ui in qtdesigner To save anything, without modifying it, use pyuic4, click it, generate bad code.

such

tab while using the SetTab Text Field Designer It should also be revealed that UI was using white space in the form of a tablet, whenever you open the designer, it gets rid of the white space. So if you set your tab text again in one place after making your changes.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -