def main(): if get_configs()['test_mode']: BASE_DIR_DIRNAME = os.path.dirname(BASE_DIR) sys.path.append(BASE_DIR_DIRNAME) server = HelpServer() server.start() app = QApplication(sys.argv) tkpy3_setup(app) widget = MainWindow() widget.show() app.setQuitOnLastWindowClosed(False) return_code = app.exec_() server.terminate() return return_code
def __init__(self, parent=None): super(BaseTkPy3, self).__init__(parent) self.layout = QHBoxLayout() self.splitter = QSplitter() self.mdi = TkPyMdiArea() self.mdi_background_style = QBrush(QColor(160, 160, 160, 255)) self.mdi_background_style.setStyle(Qt.Dense4Pattern) self.mdi.setBackground(self.mdi_background_style) self.mdi.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded) self.mdi.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded) self.mdi.setObjectName('WindowMdi') self.init_ui() def init_ui(self): self.setLayout(self.layout) self.splitter.addWidget(self.mdi) self.layout.addWidget(self.splitter, 0) if __name__ == '__main__': app = QApplication(sys.argv) tkpy3_setup(app) tkpy3 = BaseTkPy3() window = EditSubWindow() window.resize(600, 600) window.setWindowTitle('TkPy3 Sub Window') tkpy3.mdi.addSubWindow(window) tkpy3.show() tkpy3.setWindowTitle('TkPy3 Test') sys.exit(app.exec_())
def main(): app = QApplication(sys.argv) tkpy3_setup(app) dialog = ConfigDialog() sys.exit(dialog.exec_())