PyQt5 window.close() does no close the window but window.open() works fine
I'm using PyQt5 QWebEngineView to show a website on the window that supports basic functionalities like opening a new window. My code works fine for window.open() but for window.close() function on a webpage it removes the reference to the window but the window is physically there unless the user manually closes the window. import sys from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets from PyQt5.QtCore import QUrl from PyQt5.QtWidgets import QApplication class MyWindow(QtWebEngineWidgets.QWebEngineView): currentFile = '' def __init__(self,windows, parent=None): super(MyWindow, self)._