def setupUI(self):
#==============================
# main_layout for QMainWindow
main_widget = QtGui.QWidget()
self.setCentralWidget(main_widget)
main_layout = self.quickLayout('vbox') # grid for auto fill window size
main_widget.setLayout(main_layout)
'''
# main_layout for QDialog
main_layout = self.quickLayout('vbox')
self.setLayout(main_layout)
'''
#------------------------------
# ui element creation part
info_split = self.quickSplitUI( "info_split", self.quickUI(["dict_table;QTableWidget","source_txtEdit;LNTextEdit","result_txtEdit;LNTextEdit"]), "v" )
fileBtn_layout = self.quickUI(["filePath_input;QLineEdit", "fileLoad_btn;QPushButton;Load", "fileLang_choice;QComboBox", "fileExport_btn;QPushButton;Export"],"fileBtn_QHBoxLayout")
self.quickUI( [info_split, "process_btn;QPushButton;Process and Update Memory From UI", fileBtn_layout], main_layout)
self.uiList["source_txtEdit"].setWrap(0)
self.uiList["result_txtEdit"].setWrap(0)
'''
self.uiList['secret_btn'] = QtGui.QPushButton(self) # invisible but functional button
self.uiList['secret_btn'].setText("")
self.uiList['secret_btn'].setGeometry(0, 0, 50, 20)
self.uiList['secret_btn'].setStyleSheet("QPushButton{background-color: rgba(0, 0, 0,0);} QPushButton:pressed{background-color: rgba(0, 0, 0,0); border: 0px;} QPushButton:hover{background-color: rgba(0, 0, 0,0); border: 0px;}")
#:hover:pressed:focus:hover:disabled
'''
UITranslator_v1.0.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录