-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
73 lines (55 loc) · 1.91 KB
/
Copy pathtest.py
File metadata and controls
73 lines (55 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import sys
from PySide6.QtWidgets import (
QApplication,
QWizard,
QWizardPage,
QVBoxLayout,
QLabel,
QLineEdit,
QRadioButton,
)
from PySide6.QtCore import Qt
class IntroPage(QWizardPage):
def __init__(self, parent=None):
super().__init__(parent)
self.setTitle("Introduction")
self.setSubTitle("Welcome to the Mac-style Installer.")
layout = QVBoxLayout()
layout.addWidget(QLabel("This wizard simulates a native macOS installation."))
self.setLayout(layout)
class SetupPage(QWizardPage):
def __init__(self, parent=None):
super().__init__(parent)
self.setTitle("Settings")
self.setSubTitle("Configure your application.")
layout = QVBoxLayout()
layout.addWidget(QLabel("Select an option:"))
layout.addWidget(QRadioButton("Install GLPK Solver (recommended)"))
layout.addWidget(QRadioButton("Already installed GLPK solver"))
layout.addWidget(QRadioButton("Do not install GLPK Solver"))
self.setLayout(layout)
class ConclusionPage(QWizardPage):
def __init__(self, parent=None):
super().__init__(parent)
self.setTitle("Conclusion")
self.setSubTitle("Finished.")
layout = QVBoxLayout()
layout.addWidget(QLabel("Installation complete."))
self.setLayout(layout)
class MacWizard(QWizard):
def __init__(self, parent=None):
super().__init__(parent)
# KEY PART: Set the style to MacStyle
self.setWizardStyle(QWizard.WizardStyle.MacStyle)
self.addPage(IntroPage())
self.addPage(SetupPage())
self.addPage(ConclusionPage())
self.setWindowTitle("Installation")
self.resize(600, 400)
if __name__ == "__main__":
app = QApplication(sys.argv)
# Optional: Set theme to light/dark
# app.setStyle("macos")
wizard = MacWizard()
wizard.show()
sys.exit(app.exec())