-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprac2.py
More file actions
44 lines (30 loc) · 990 Bytes
/
prac2.py
File metadata and controls
44 lines (30 loc) · 990 Bytes
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
import sys
from PyQt4 import QtGui, QtCore
class Window(QtGui.QMainWindow):
def __init__(self):
super(Window, self).__init__()
self.setGeometry(50, 50, 500, 300)
self.setWindowTitle("Festival_controller")
self.setWindowIcon(QtGui.QIcon('inhun_favicon.png'))
self.home()
def home(self):
btn = QtGui.QPushButton("Quit", self)
btn.resize(100, 100)
btn.move(100, 100)
btn.clicked.connect(self.close_application)
comboBox = QtGui.QComboBox(self)
comboBox.addItem("1개")
comboBox.addItem("2개")
comboBox.addItem("3개")
comboBox.addItem("4개")
comboBox.addItem("5개")
comboBox.activated[str].connect(self.choice)
comboBox.move(200, 200)
self.show()
def choice(self):
print("choice!!")
def close_application(self):
print("click!")
app = QtGui.QApplication(sys.argv)
GUI = Window()
sys.exit(app.exec_())