Hi, I have this simple code:
import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtWebKit import * def close(): sys.exit() app = QApplication(sys.argv) web = QWebView() QObject.connect(web.page(),SIGNAL("windowCloseRequested ()"),close) web.load(QUrl("a.html")) web.show() sys.exit(app.exec_()) and 2 more files, that is a.html: <a href="b.html">link to B</a><br/> <a href="#" onclick="window.close()">close this window</a> and b.html: <a href="a.html">link to A</a><br/> <a href="#" onclick="window.close()">close this window</a> When you load the app, and then clicks on "close this window" the window closes But if you click on link to B and then click on "close this window" the window doesn't closes. Why this happens? There is any solution so this signals keep working even after loading another URL? thanks! _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt