How to use the qdarkstyle.load_stylesheet_pyqt5 function in QDarkStyle

To help you get started, we’ve selected a few QDarkStyle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Fluorescence-Tools / chisurf / chisurf / tools / fret_lines / fret_lines.py View on Github external
self.parameter_name = str(self.comboBox_2.currentText())

    def update_parameter(self):
        self.comboBox_2.clear()
        self.comboBox_2.addItems(self.model.parameter_names)

    def onModelChanged(self):
        self.model.close()
        self.model = self.current_model_index
        self.verticalLayout.addWidget(self.model)


if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    win = FRETLineGeneratorWidget()
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    win.show()
    sys.exit(app.exec_())
github shootsoft / PlutoVideoSnapshoter / src / app.py View on Github external
import os
from PyQt5 import QtGui

from PyQt5.QtWidgets import QApplication

from pluto.ui.player.controllers import PlayerController
from pluto.ui.qt.mvc.routers import Router
from pluto.ui.stitcher.controllers import ImageStitchingController
from pluto.ui.qt.qtutils import QtUtil
import qdarkstyle

if __name__ == '__main__':
    app = QApplication(sys.argv)
    # setup stylesheet
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    app.setWindowIcon(QtGui.QIcon(QtUtil.resource_path(os.path.join('windows', 'pluto.png'))))
    router = Router(app)
    router.add_ctrl('player', PlayerController(router))
    router.add_ctrl('image', ImageStitchingController(router))
    router.go('player')
    sys.exit(app.exec_())
github Fluorescence-Tools / chisurf / mfm / tools / modelling / potential_enery.py View on Github external
filename = mfm.widgets.get_filename(
            'Open Trajectory-File',
            'H5-Trajectory-Files (*.h5)'
        )
        self.trajectory_file = filename
        self.lineEdit.setText(self.trajectory_file)

    @property
    def energy(self) -> float:
        return self.universe.getEnergy(self.structure)


if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    win = PotentialEnergyWidget()
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    win.show()
    sys.exit(app.exec_())
github physercoe / starquant / gui.py View on Github external
font = QtGui.QFont('Microsoft Sans Serif', 12)
        if config_client['language'] == 'cn':
            config_file = os.path.join(path, 'source/gui/language/cn/live_text.yaml')
            font = QtGui.QFont(u'微软雅黑', 10)
        with open(os.path.expanduser(config_file), encoding='utf8') as fd:
            lang_dict = yaml.load(fd)
        lang_dict['font'] = font
    except IOError:
        print("live_text.yaml is missing")

    app = QtWidgets.QApplication(sys.argv)
    mainWindow = MainWindow(config_server, config_client, lang_dict)

    if config_client['theme'] == 'dark':
        import qdarkstyle
        app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())

    mainWindow.showMaximized()

    sys.exit(app.exec_())
github borgbase / vorta / src / vorta / application.py View on Github external
if self.isRunning() and single_app:
            self.sendMessage("open main window")
            print('An instance of Vorta is already running. Opening main window.')
            sys.exit()

        init_translations(self)

        self.setQuitOnLastWindowClosed(False)
        self.scheduler = VortaScheduler(self)

        # Prepare system tray icon
        self.tray = TrayMenu(self)

        # Apply dark stylesheet
        if SettingsModel.get(key='use_dark_theme').value:
            self.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())

        args = parse_args()
        if not (hasattr(args, 'daemonize') and args.daemonize):
            if (hasattr(args, 'foreground') and args.foreground) or SettingsModel.get(key='foreground').value:
                self.open_main_window_action()

        self.backup_started_event.connect(self.backup_started_event_response)
        self.backup_finished_event.connect(self.backup_finished_event_response)
        self.backup_cancelled_event.connect(self.backup_cancelled_event_response)
        self.message_received_event.connect(self.message_received_event_response)
        self.set_borg_details_action()
github Fluorescence-Tools / chisurf / chisurf / tools / fret_calculator / tau2r.py View on Github external
    @property
    def E(self) -> float:
        return float(self.doubleSpinBox_4.value())

    @E.setter
    def E(
            self,
            v: float
    ):
        self.doubleSpinBox_4.setValue(v)


if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    win = FRETCalculator()
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    win.show()
    sys.exit(app.exec_())
github 05dirnbe / nefi / gui_prototypes / Dennis / new / MainController.py View on Github external
# add the image widget to the parents vertical layout
        parent_vbox_layout.addWidget(image_widget)


class LeftImageCustomWidget(QtWidgets.QWidget):
    def __init__(self, main_image_label):
        self.main_image_label = main_image_label

    def mousePressEvent(self, event):
        if event.button() == Qt.LeftButton:
            self.main_image_label.setPixmap(QtGui.QPixmap(self.pixmap))


if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())

    wnd2 = MainView()
    # wnd2.setWindowState(Qt.WindowFullScreen)
    wnd2.show()

    sys.exit(app.exec_())
github Fluorescence-Tools / chisurf / mfm / tools / tttr / convert.py View on Github external
def ending_changed(self):
        self.filelist.filename_ending = self.ending

    def open_target(self, filename=None):
        if filename is None:
            filename = mfm.widgets.save_file(file_type="*.photon.h5")
        self.lineEdit.setText(filename)
        spc_files = self.filenames
        h5 = mfm.io.tttr.spc2hdf(spc_files, routine_name=self.filetype, filename=filename)
        h5.close()


if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    win = TTTRConvert()
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    win.show()
    sys.exit(app.exec_())
github Fluorescence-Tools / chisurf / mfm / widgets / configuration_editor / configuration_editor.py View on Github external
def json_file(
            self,
            v: str
    ):
        with mfm.io.zipped.open_maybe_zipped(
                filename=v,
                mode='r'
        ) as fp:
            self._dict = json.load(fp)
        self._json_file = v


if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    win = ParameterEditor()
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    win.show()
    sys.exit(app.exec_())
github portugueslab / stytra / stytra / examples / custom_exp.py View on Github external
self.start = False

        msgBox = QMessageBox()
        msgBox.setText("Start the protocol when ready")
        msgBox.setStandardButtons(QMessageBox.Ok)
        ret = msgBox.exec_()
        super().start_protocol()


if __name__ == "__main__":
    # Here we do not use the Stytra constructor but we instantiate an experiment
    # and we start it in the script. Even though this is an internal Experiment
    # subtype, a user can define a new Experiment subclass and start it
    # this way.
    app = QApplication([])
    app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
    protocol = FlashProtocol()
    exp = CustomExperiment(protocol=protocol, app=app)
    exp.start_experiment()
    app.exec_()