You are required to develop a Multiple Document Interface application for the following scenario:
An MDI consists of a main window with a menu bar, toolbar and central workspace widget. You are required to develop a basic tourism event management application for your community that displays information of events,venues and bookings(reservation).Dates and start times are required for the events.Venue capacity, address and contact detail of event manager must be recorded for each venue.Client information in terms of name, and contact details must also be managed by your program.Store all your data in text files.
Make use of at least of the following widget.
QMenubar
QFileDialog
Any widgets used to date that may be usefull
from PyQt5.QtWidgets import QApplication, QMainWindow, QMdiArea, QAction, QMdiSubWindow, QTextEdit
import sys
class MyWindow(QMainWindow):
def __init__(self):
super().__init__()
self.mdi = QMdiArea()
self.setCentralWidget(self.mdi)
bar = self.menuBar()
file = bar.addMenu("File")
file.addAction("New")
file.addAction("Save")
file.addAction("Exit")
file.triggered[QAction].connect(self.WindowTrig)
self.setWindowTitle("Tourism event management application")
def WindowTrig(self, t):
if t.text() == "New":
sub = QMdiSubWindow()
sub.setWidget(QTextEdit())
self.mdi.addSubWindow(sub)
sub.show()
app = QApplication(sys.argv)
mdi =MDIWindow()
mdi.show()
app.exec_()
Comments
Leave a comment