def main():
    sys.excepthook = uncaught_exceptions
    logging.basicConfig(level=logging.INFO)
    logging.getLogger().setLevel(logging.INFO)
    try:  # pyside2
        app = QtWidgets.QApplication()
    except TypeError:  # pyqt5
        app = QtWidgets.QApplication([])
    win = MainWindow()
    win.show()
    app.exec_()
Пример #2
0
            if settings.value('Kluster/layer_settings_transparency'):
                self.transparency.setText(
                    str(
                        int(
                            float(
                                settings.value(
                                    'Kluster/layer_settings_transparency')) *
                            100)))
            if settings.value('Kluster/layer_settings_surfacetransparency'):
                self.surf_transparency.setText(
                    str(
                        int(
                            float(
                                settings.value(
                                    'Kluster/layer_settings_surfacetransparency'
                                )) * 100)))
        except AttributeError:
            # no settings exist yet for this app, .lower failed
            pass


if __name__ == '__main__':
    try:  # pyside2
        app = QtWidgets.QApplication()
    except TypeError:  # pyqt5
        app = QtWidgets.QApplication([])
    dlog = LayerSettingsDialog()
    dlog.show()
    if dlog.exec_():
        pass