def wrap(self, container, widget): """Wrap the given widget in the given container.""" self._widget = widget container.setFocusProxy(widget) widget.setParent(container) if (qtutils.version_check('5.8.0', exact=True) and objects.backend == usertypes.Backend.QtWebEngine and container.window() and container.window().windowHandle() and not container.window().windowHandle().isActive()): log.misc.debug("Calling QApplication::sync...") # WORKAROUND for: # https://bugreports.qt.io/browse/QTBUG-56652 # https://codereview.qt-project.org/#/c/176113/5//ALL,unified QApplication.sync()
def wrap(self, container, widget): """Wrap the given widget in the given container.""" self._widget = widget container.setFocusProxy(widget) widget.setParent(container) if (qtutils.version_check('5.8.0', exact=True, compiled=False) and objects.backend == usertypes.Backend.QtWebEngine and container.window() and container.window().windowHandle() and not container.window().windowHandle().isActive()): log.misc.debug("Calling QApplication::sync...") # WORKAROUND for: # https://bugreports.qt.io/browse/QTBUG-56652 # https://codereview.qt-project.org/#/c/176113/5//ALL,unified QApplication.sync()
ui = ui_file else: ui = "p2pp.ui" if len(os.path.dirname(sys.argv[0])) > 0: ui = "{}\\{}".format(os.path.dirname(sys.argv[0]), ui_file) else: ui = ui_file app = QApplication([]) Form, Window = uic.loadUiType(ui) window = Window() form = Form() form.setupUi(window) create_logitem("P2PP Version: {}".format(version.Version)) create_logitem("Python Version: {}".format(sys.version.split(' ')[0])) create_logitem("Platform: {}".format(sys.platform)) create_emptyline() if sys.platform != "darwin": form.filename.setFont(QFont("Courier", 8)) form.label_6.setFont(QFont("Courier", 10)) form.label_5.setFont(QFont("Courier", 8)) form.label_4.setFont(QFont("Courier", 8)) form.label.setFont(QFont("Courier", 8)) form.exitButton.setFont(QFont("Courier", 8)) form.textBrowser.setFont(QFont("Courier", 8)) window.show() app.sync()