review with correct answers a+
rated
method used to connect to the database - Answer connect ()
Methods supported by QTime - Answer current Time( ): Fetches
the system's clock time and returns it as a Q Time object
hour(): Returns the number of hours
minute(): Returns the number of minutes
seconds(): Returns the number of seconds
msec( ): Returns the number of miiseconds
add Secs( ): Returns the time after adding a specified number of
seconds
addMSecs( ): Returns the time after adding a specified number of
milliseconds
secsTo( ): Returns the number of seconds between two times
msecsTo( ): Returns the number of milliseconds between two
times
information returned by QTime methods can be converted in text
format - Answer toString( )
widget and class used to display a monthly calendar - Answer You
use a calendar widget which is an instance of QCalendarWidget
class
,properties of the calendar widget - Answer minimumDate: Used to
specify the minimum date range
maximumDate: Used to specify the maximum date range
selectionMode: set this property to NoSelection to prohibit the
user from selecting a date
vetcalHeaderFormat: set this property to No VerticalHeader t
remove the week numbers
gridVisible: Set this property to True to turn on the calendar grid
HorizontalHeaderFormat Used for specifying the form in which
days are displayed.
Methods provided by Q Calendar Widget - Answer selected Date():
returns the selected date
month Shown( ): returns the displayed month
year Shown( ): returns the currently displayed year
set First Day Of Week( ): used to set the day in the first column
selectionChanged
class used when working with dates - Answer QDate class
Methods provided by the QDate class - Answer currentDate():
Returns the system date as a QDate object.
setDate(): Sets a date by specifying the year, month,
and day.
year(): Returns the year from the specified date
, object.
month(): Returns the month from the specified date
object.
day(): Returns the day from the specified date
object.
dayOfWeek(): Returns the day of the week from the
specified date object.
addDays(): Adds the specified number of days to the
specified date and returns new date.
addMonths(): Adds the specified number of months to the
specified date and returns new date.
addYears(): Adds the specified number of years to the
specified date and returns new date.
daysTo(): Returns the number of days between two
dates.
daysInMonth(): Returns the number of days in the specified
month.
daysInYear(): Returns the number of days in the specified
year.
isLeapYear(): Returns true if the specified date is in a leap
year.
toPyDate(): Returns the date as a stri
Widget to display and edit dates - Answer Date Edit widget which
is an instance of the the QDateEdit class