Skip to content

Commit 9fec180

Browse files
committed
Create Desktop App with PyQT6 - Widgets
Create Desktop App with PyQT6 - Widgets
1 parent 66bc826 commit 9fec180

File tree

8 files changed

+115
-0
lines changed

8 files changed

+115
-0
lines changed

.idea/.gitignore

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/python____project.iml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.py

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import sys
2+
from PyQt6.QtWidgets import (
3+
QApplication,
4+
QCheckBox,
5+
QComboBox,
6+
QDateEdit,
7+
QDateTimeEdit,
8+
QDial,
9+
QDoubleSpinBox,
10+
QFontComboBox,
11+
QLabel,
12+
QLCDNumber,
13+
QLineEdit,
14+
QMainWindow,
15+
QProgressBar,
16+
QPushButton,
17+
QRadioButton,
18+
QSlider,
19+
QSpinBox,
20+
QTimeEdit,
21+
QVBoxLayout,
22+
QWidget,
23+
)
24+
25+
class MainWindow(QMainWindow):
26+
def __init__(self):
27+
super().__init__()
28+
29+
self.setWindowTitle("Widgets App")
30+
31+
layout = QVBoxLayout()
32+
widgets = [
33+
QCheckBox,
34+
QComboBox,
35+
QDateEdit,
36+
QDateTimeEdit,
37+
QDial,
38+
QDoubleSpinBox,
39+
QFontComboBox,
40+
QLCDNumber,
41+
QLabel,
42+
QLineEdit,
43+
QProgressBar,
44+
QPushButton,
45+
QRadioButton,
46+
QSlider,
47+
QSpinBox,
48+
QTimeEdit,
49+
]
50+
51+
for w in widgets:
52+
layout.addWidget(w())
53+
54+
widget = QWidget()
55+
widget.setLayout(layout)
56+
self.setCentralWidget(widget)
57+
58+
59+
app = QApplication(sys.argv)
60+
window = MainWindow()
61+
window.show()
62+
63+
app.exec()

0 commit comments

Comments
 (0)