1
0
Fork 0
mirror of synced 2024-07-03 13:40:47 +12:00
Rare/rare/components/tabs/settings/debug.py
loathingKernel 9ca39d94ab GlobalSignals: Reorganize signals into groups
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00

22 lines
805 B
Python

from PyQt5.QtWidgets import QWidget, QVBoxLayout, QPushButton
from rare.shared import GlobalSignalsSingleton
class DebugSettings(QWidget):
def __init__(self):
super(DebugSettings, self).__init__()
self.setLayout(QVBoxLayout())
self.raise_runtime_exception_button = QPushButton("Raise Exception")
self.layout().addWidget(self.raise_runtime_exception_button)
self.raise_runtime_exception_button.clicked.connect(self.raise_exception)
self.restart_button = QPushButton("Restart")
self.layout().addWidget(self.restart_button)
self.restart_button.clicked.connect(lambda: GlobalSignalsSingleton().application.quit.emit(-133742))
self.layout().addStretch(1)
def raise_exception(self):
raise RuntimeError("Debug Crash")