INF2611 LATEST
EXAM PACK
,TABLE OF CONTENTS
NOVEMBER 2017
JUNE 2017
NOTES
QUESTION PAPERS
,INF2611-2017-Oct/Nov Memo
Question 1)
1.1)
a)
Use LCD Number widget (QLCDNumber class) to display decimal,
Use QTimer class to perform repetitive timer class
b)
The value() method of the QLCDNumber class returns the numerical value displayed by the LCD
Number widget
c)
The setMode() is used change the base of the numbers (Hex, Dec, Oct, Bin)
self.lcdNumber.setMode(QLCDNumber.Dec)
1.2)
a)
Timers is used to perform a repetitive task; to use a timer you have to create an instance of QTimer
class
b)
setSingleShot(true): set the timer to generate a timeout() signal only once
singleShot(n): set the timer to generate a timeout() signal only once after n millisecond
1.3)
a)
The purpose of selectionChanged() signal is to call function dispdate when a calendar date is
changed
b)
The name of the function that retrieves the date selected by the user is selectedDate() of the
calenderWidget, and the widget that displays the output is the object of the QDateEdit (dateEdit)
, INF2611-2017-Oct/Nov Memo
c)
self.ui.dateEdit.setDisplayFormat(‘d MMM yyyy’)
1.4)
Price = 0
If chosenoption == “VIP”:
Price = 200
If chosenoption == “Grand Stand”:
Price = 80
If chosenoption == “East Stand”:
Price = 60
If chosenoption == “Open Wing”:
Price = 40
Totalprice = Price * noOfPersons
Self.ui.PriceInfo.setText(‘Price for ’+ chosenoption+’ is R‘+str(Price)+’. Total for ‘+noOfPersons+’ is:
R’+str(Totalprice))
1.5)
a)
1) By creating an action in the Action Editor and dragging and dropping it into a menu
2) By typing text for menus and menu entries in the menu bar replacing the Type Here
placeholder
b) statusTip is use to make the status bar message to appear when the user hover over any menu
entry, set through the statusTip property
EXAM PACK
,TABLE OF CONTENTS
NOVEMBER 2017
JUNE 2017
NOTES
QUESTION PAPERS
,INF2611-2017-Oct/Nov Memo
Question 1)
1.1)
a)
Use LCD Number widget (QLCDNumber class) to display decimal,
Use QTimer class to perform repetitive timer class
b)
The value() method of the QLCDNumber class returns the numerical value displayed by the LCD
Number widget
c)
The setMode() is used change the base of the numbers (Hex, Dec, Oct, Bin)
self.lcdNumber.setMode(QLCDNumber.Dec)
1.2)
a)
Timers is used to perform a repetitive task; to use a timer you have to create an instance of QTimer
class
b)
setSingleShot(true): set the timer to generate a timeout() signal only once
singleShot(n): set the timer to generate a timeout() signal only once after n millisecond
1.3)
a)
The purpose of selectionChanged() signal is to call function dispdate when a calendar date is
changed
b)
The name of the function that retrieves the date selected by the user is selectedDate() of the
calenderWidget, and the widget that displays the output is the object of the QDateEdit (dateEdit)
, INF2611-2017-Oct/Nov Memo
c)
self.ui.dateEdit.setDisplayFormat(‘d MMM yyyy’)
1.4)
Price = 0
If chosenoption == “VIP”:
Price = 200
If chosenoption == “Grand Stand”:
Price = 80
If chosenoption == “East Stand”:
Price = 60
If chosenoption == “Open Wing”:
Price = 40
Totalprice = Price * noOfPersons
Self.ui.PriceInfo.setText(‘Price for ’+ chosenoption+’ is R‘+str(Price)+’. Total for ‘+noOfPersons+’ is:
R’+str(Totalprice))
1.5)
a)
1) By creating an action in the Action Editor and dragging and dropping it into a menu
2) By typing text for menus and menu entries in the menu bar replacing the Type Here
placeholder
b) statusTip is use to make the status bar message to appear when the user hover over any menu
entry, set through the statusTip property