Search Header Logo

26.1 Знакомство с PyQt

Authored by Igor Perekalskiy

Science

5th Grade

Used 1+ times

26.1 Знакомство с PyQt
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Установка библиотеки PyQt 5 выполняется командой

apt-get install PyQt5
yum install PyQt5

pip install PyQt5

brew install PyQt5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Выражение label = QtWidgets.QLabel("<center>Привет, мир!</center>") выведет:

The QLabel will display the text '
Привет, мир!
' with the HTML tags visible.
The QLabel will display an error message due to incorrect syntax.
The QLabel will display the text '<center>Привет, мир!</center>' as it is.
The QLabel will display the text 'Привет, мир!' without any HTML tags.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Выражение:

window.setWindowTitle("Программа на PyQt")

задает текст, который будет выводиться в заголовке окна, для чего используется метод

setWindowTitle()

Запускает приложение окна

Python
C++

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Выражение window.resize(300, 70) делает

Closes the window
Maximizes the window
Minimizes the window
Resizes the window

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

выражение:

btnQuit = QtWidgets.QPushButton("&Закрыть окно")

QPushButton с текстом 'Закрыть окно' и комбинацией клавиш 'Alt+З'
QLineEdit с текстом 'Закрыть окно'
QLabel с текстом 'Закрыть окно'
QComboBox с текстом 'Закрыть окно'

6.

OPEN ENDED QUESTION

3 mins • 1 pt

Вася написал код. но он не работает. помогите Васе

from PyQt5 import QtWidgets


class MyWindow(QtWidgets.QWidget):
def init(self, parent=None):
QtWidgets.QWidget.__init__(self, parent)
label = QtWidgets.QLabel("Привет, мир!")
label.setAlignment(QtCore.Qt.AlignHCenter)
btnQuit = QtWidgets.QPushButton("&Закрыть окно")
vbox = QtWidgets.QVBoxLayout()
vbox.addWidget(self.label)
vbox.addWidget(self.btnQuit)
setLayout(self.vbox)
btnQuit.clicked.connect(QtWidgets.qApp.quit)


if name == "__main__":
import sys

app = QtWidgets.QApplication(sys.argv)
window = MyWindow()
window.setWindowTitle("ООП-стиль окна")
window.resize(300, 70)
window.show()
sys.exit(app.exec_())

Evaluate responses using AI:

OFF

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?