Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9fec180

Browse files
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

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/inspectionProfiles/Project_Default.xml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/python____project.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎main.py

Lines changed: 63 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /