connect() - Answer method used to connect to the database
host name, user name, password and database name.
The host’s name specifies the location of our MySQL database server. The username and
password of the authorized user are provided, and the name of the database you want is
provided as the last parameter. - Answer list and explain parameters that the connect() method
uses to connect to the database
1) show table name
2)describe table name;
3)select * in table name; - Answer Provide the three lines of SQL code necessary to display 1) all
tables in a database, 2) the structure of a database table, 3)the records/rows in a table
To display LCD-like digits, you use the LCD Number widget, an instance of the Cucumber
class. - Answer Explain how to display LCD-like widgets, by referring to the relevant widget and
class names
value() - Answer method the returns a numerical value displayed by an LCD number widget
Used to change the base of the numbers - Answer Purpose of the set Mode() method in
displaying LCD digits
set Mode(): used to change the base of the numbers
display(): to display content as LCD digits
1 | Page
, value(): returns the numerical value displayed by the LCD Number widget - Answer methods
provided by Cucumber class
timer, and instance of the Timer class - Answer to perform a repetitive task, you use?
You just need to create an instance of Timer and connect its timeout( ) signal to the slot that
performs the desired task - Answer How do you use timers?
start(n): initiates the timer to generate a timeout( ) signal at n millisecond intervals
setSingleShot(true): sets the timer to generate a timeout( ) signal only once
singleShot (n): sets the timer to generate a timeout( ) signal only once after a milliseconds -
AnswerA timeout( ) signal can be controlled by what methods?
QTime Class - AnswerUsed to fetch the system clock time and measure a span of elapsed time
currentTime( ): Fetches the system's clock time and returns it as a QTime 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
addSecs( ): 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 - AnswerMethods
supported by QTime
2 | Page