WorksheetsQt Design
Total questions: 15
Worksheet time: 23mins
What's PyQt5 ?
A programming language(Langage de programmation)
A package contains tools to create GUI(Graphical user interface)
A package contains tools to create Web apps
Which of the following events is related to a button click in PyQt5?
clicked()
pressed()
released()
I want to create a QMessageBox that contains <Bravo>, Which of the following is the correct answer ?
m = QMessageBox()
m.setText("Bravo")
m = QMessageBox()
m.setText("Bravo")
m.exec_()
m = QMessageBox()
m.setText("Bravo")
exec_()
What's the function that allows me change the text of label ?
(a)
What's the keyword used to work with a variable in the main program ?
global
general
global_var
Which of the following is similar to this syntax:
window = QtWidgets.loadUi("design.ui")
button = window.findChild(QtWidgets.QApplication, "button")
button.clicked.connect(function)
window = QtWidgets.loadUi("design.ui")
button.clicked.connect(function)
window = QtWidgets.loadUi("design.ui")
window.button.clicked.connect(function)
What'does the function show()
Ta3mel chwaya fazet fil application
It makes the application visible
Creates the application
What's the correct order ?
app = QApplication([])
window = loadUi("design.ui")
window.show()
window = loadUi("design.ui")
app = QApplication([])
window.show()
window = loadUi("design.ui")
window.show()
app = QApplication([])
How to clear the content of a LinEdit named "user"
user.effacer()
user.clear()
user.clean()
user.free()
EchoMode is a property of:
LineEdit
PushButton
Label
What is the purpose of the QLineEdit in PyQt5?
It allows users to enter a text value
It allows users to select a value from a predefined range
It displays a text
What is the main difference between for loop and while loop?
A for loop can only be used to iterate over a collection of items, while a while loop can be used to repeat any block of code
A while loop can only be used to iterate over a collection of items, while a for loop can be used to repeat any block of code
A for loop is used for a fixed number of iterations, while a while loop is used for an unknown number of iterations
In which scenario would you typically use a while loop?
When you need to repeat a block of code until a condition is met
When you need to repeat a block of code for a fixed number of iterations
We have the following code and we want to add a line of code to stop the while loop from executing, What line of code should we add ?
condition = True
while condition:
print("Hello")
(a)
السبوعي في قضية رمضان، يحب حكة ؟
شامية
هريسة
معجون
