[阅读: 596] 2008-10-08 11:15:46
class GWebPage(QtWebKit.QWebPage):
def __init__(self, *args):
super(self.__class__,self).__init__(*args)
def acceptNavigationRequest(self, frame, request, type):
#frame is not null, then will be a new window
return QtWebKit.QWebPage.acceptNavigationRequest(self,frame, request, type)
///application code as following
self.webKit = QtWebKit.QWebView()
page = GWebPage(self.webKit)
self.webKit.setPage(page)