Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Qt Design

Total questions: 15

Worksheet time: 23mins

Name
Class
Date
1.

What's PyQt5 ?

a)

A programming language(Langage de programmation)

b)

A package contains tools to create GUI(Graphical user interface)

c)

A package contains tools to create Web apps

2.

Which of the following events is related to a button click in PyQt5?

a)

clicked()

b)

pressed()

c)

released()

3.

I want to create a QMessageBox that contains <Bravo>, Which of the following is the correct answer ?

a)

m = QMessageBox()

m.setText("Bravo")

b)

m = QMessageBox()

m.setText("Bravo")

m.exec_()

c)

m = QMessageBox()

m.setText("Bravo")

exec_()

4.

What's the function that allows me change the text of label ?

(a)  

5.

What's the keyword used to work with a variable in the main program ?

a)

global

b)

general

c)

global_var

6.

Which of the following is similar to this syntax:

window = QtWidgets.loadUi("design.ui")

button = window.findChild(QtWidgets.QApplication, "button")

button.clicked.connect(function)

a)

window = QtWidgets.loadUi("design.ui")

button.clicked.connect(function)

b)

window = QtWidgets.loadUi("design.ui")

window.button.clicked.connect(function)

7.

What'does the function show()

a)

Ta3mel chwaya fazet fil application

b)

It makes the application visible

c)

Creates the application

8.

What's the correct order ?

a)

app = QApplication([])

window = loadUi("design.ui")

window.show()

b)

window = loadUi("design.ui")

app = QApplication([])

window.show()

c)

window = loadUi("design.ui")

window.show()

app = QApplication([])

9.

How to clear the content of a LinEdit named "user"

a)

user.effacer()

b)

user.clear()

c)

user.clean()

d)

user.free()

10.

EchoMode is a property of:

a)

LineEdit

b)

PushButton

c)

Label

11.

What is the purpose of the QLineEdit in PyQt5?

a)

It allows users to enter a text value

b)

It allows users to select a value from a predefined range

c)

It displays a text

12.

What is the main difference between for loop and while loop?

a)

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

b)

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

c)

A for loop is used for a fixed number of iterations, while a while loop is used for an unknown number of iterations

13.

In which scenario would you typically use a while loop?

a)

When you need to repeat a block of code until a condition is met

b)

When you need to repeat a block of code for a fixed number of iterations

14.

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)  

15.

السبوعي في قضية رمضان، يحب حكة ؟

a)

شامية

b)

هريسة

c)

معجون