Hi, i've been working on simple code just prototyping the system i'd like to make. This all works and is going great apart from my "quit" button, the button appears. however when you click on it, it doesn't close the interface..i think it just stops the code from running or something.
Any idea where I might have gone wrong in my code?!
Thanks
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class Form(QWidget):
def __init__(self):
QWidget.__init__(self)
label = QLabel("Book or Amend a Badminton Court:\n\n")
layout = QGridLayout()
combo = QComboBox()
combo.addItems(["Available","Booked"])
layout.addWidget(QLabel("09:00: "),0,0)
layout.addWidget(combo,0,1)
button = QPushButton("Quit")
layout.addWidget(QLabel(" "),1,0)
layout.addWidget(button,1,1)
self.setLayout(layout)
self.connect(button, SIGNAL("clicked()"),app.quit)
self.setWindowTitle("Badminton Court Booking")
app = QApplication(sys.argv)
form = Form()
form.show()
app.exec_()