module 'PyQt5' has no attribute 'QtWebEngineWidgets'

584 Views Asked by At

![My Code][1]

I installed all the libraries using pip and pip3.

I'm using python 3.8.3 and spyder 4.1.4

when ı writing codes IDE show me all libraries in QtWebEngine but trying to start my code IDE says

"module 'PyQt5' has no attribute 'QtWebEngineWidgets'" and ı have all QtWebEngineWidgets files in computer.

import PyQt5 as py
import sys

app=py.QtWidgets.QApplication(sys.argv)
#app = Py.QApplication(sys.argv)

window = py.QtWidgets.QMainWindow()
window = py.QtWidgets.QWidget()



p=py.QtWebEngineWidgets.QWebEngineView(window)
b=py.QtCore.QUrl('https://stackoverflow.com')
p.load(b)
p.show()





window.setGeometry(0, 35, 400, 400)
window.setWindowTitle("Ground Control")
window.show()

app.exec_()
1

There are 1 best solutions below

1
Captain120 On
from PyQt5 import QtWidgets, QtWebEngineWidgets

pop this in and this should get you further