1

Code:

from PyQt5 import QtGui
import sys

app = QtGui.QApplication(sys.argv)

window = QtGui.GWidget()

window.show()

Podrían decirme por qué sale este error, por favor.

AttributeError: module 'PyQt5.QtGui' has no attribute 'QApplication'

1 respuesta 1

2

La API ha cambiado en PyQt5:

from PyQt5 import QtGui, QtWidgets

# ...

app = QtWidgets.QApplication(sys.argv)

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.