Guest User

Untitled

a guest
Jul 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. class MyWidget(QWidget):
  2.  
  3. window = ... # type: QObject
  4.  
  5. def __init__(self, ui_file, parent=None):
  6. super(MyWidget, self).__init__(parent)
  7. ui_file = QFile(ui_file)
  8. ui_file.open(QFile.ReadOnly)
  9.  
  10. loader = QUiLoader()
  11. self.window = loader.load(ui_file)
  12.  
  13. ui_file.close()
  14. # all_click_btn = self.window.findChild(QCheckBox, 'all_click')
  15. # all_click_btn.clicked.connect(self.all_click_handler)
  16.  
  17. # log 控件設定
  18. self.edit = self.window.findChild(QTextEdit, 'out_log')
  19. self.out = None
  20.  
  21. self.window.show()
Add Comment
Please, Sign In to add comment