Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 5 pages
Exam (elaborations)

INF2611 Assignment Semesters 1 and 2 2021

Document preview thumbnail
Preview 2 out of 5 pages

INF2611 Assignment Semesters 1 and 2 2021

Content preview

INF2611
2021




Assignment
Assignment 2
number:
Assignment unique
863984
code:
Student number:
Last name &
Initials

Theme Advanced Widgets, Menus, Toolbars



Statement of Compliance
This assignment includes:
• Part A – program source code.

Statement of Originality
This is to certify that to the best of my knowledge; the content of this assignment is my own work.

I certify that the intellectual content of this assignment is the product of my own work and that all
the assistance received in preparing this assignment and sources have been acknowledged.




INF2611 Assignment 2 Template v1.0

, INF2611 Assignment 2




Part A – Single Window Application Source code
You are required to develop a single screen application for the following scenario:



Often it is necessary to calculate how much time (days, hours etc.) will pass before a certain event will take
place. Your app will assist member of the public in calculating how long they will have to wait for their
COVID vaccination. The app must be a simple single screen application that display the current date and
time, inputs the future date, and then displays how much time until the COVID vaccination will take place.


Make use of the following widgets:

• QCalenderWidget (use 2 calendars, one for current date and one for future date)
• QPushButton
• Any display widget for the message showing how much time still to pass


Source code:

Covid.py:

from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(380, 645)
self.mainwidget = QtWidgets.QWidget(MainWindow)
self.mainwidget.setObjectName("Mainwidget")
self.calToday = QtWidgets.QCalendarWidget(self.mainwidget)
self.calToday.setGeometry(QtCore.QRect(35, 75, 318, 188))
self.calToday.setGridVisible(False)
self.calToday.setDateEditEnabled(False)
self.calToday.setObjectName("calToday")
self.calVaccination = QtWidgets.QCalendarWidget(self.mainwidget)
self.calVaccination.setGeometry(QtCore.QRect(35, 335, 318, 188))
self.calVaccination.setObjectName("calVaccination")
self.buttonCalculate = QtWidgets.QPushButton(self.mainwidget)
self.buttonCalculate.setGeometry(QtCore.QRect(35, 555, 80, 28))


2

Connected book
 image
Joshua Willman Beginning PyQt
Publisher: 2020 ISBN: 9781484258569 Edition: Unknown

Document information

Uploaded on
June 14, 2021
Number of pages
5
Written in
2020/2021
Type
Exam (elaborations)
Contains
Questions & answers
$3.20

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
tharagen
1.0
(1)
Sold
37
Followers
33
Items
5
Last sold
1 year ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions