Код на python , делал калькулятор import sys
from PyQt5 import QtCore, QtGui
from Calculator1 import Ui_Form
import math # потом

app = QtGui.QGuiApplication(sys.argv)

Form = QtGui.QWidget()
ui = Ui_Form()
ui.setupUi(Fo)
Fo.show()

symbol = ""
view_numbers = ''
num_1 = ''
num_2 = ''

def button_0():
global view_numbers
global num_1
view_numbers = view_numbers + '0'
ui.lineEdit.setText(view_numbers) # Вывод числа
num_1 = num_1 + '0'

ui.pushButton_24.clicked.connect(button_0)

sys.exit(app.exec_())

ошибка:
Traceback (most recent call last):
File "C:\Users\User\Calculator uii\Calc\Code\Programm1.py", line 8, in
Form = QtGui.QWidget()
AttributeError: module 'PyQt5.QtGui' has no attribute 'QWidget'

sharunovamaria01 sharunovamaria01    3   04.01.2021 00:46    0

Ответы
Mozgi1706 Mozgi1706  12.02.2021 22:04

from PyQt5 import QtWidgets

Form = QtWidgets.QWidget()

Объяснение:

ПОКАЗАТЬ ОТВЕТЫ
Другие вопросы по теме Информатика