qtwebkit - Python and webkit Qt4 -


i'm trying show webpage in frame, can't figure out how it, because can't find right documentation and/or tutorial qtwebkit.

thanks.

import sys pyqt4 import qtgui, qtcore, qtwebkit  class mainwindow(qtgui.qmainwindow):     def __init__(self):         qtgui.qmainwindow.__init__(self)          self.resize(350, 250)         self.setwindowtitle('mainwindow')          self.statusbar().showmessage('loading...')          self.web = qtwebkit.qwebview()         self.web.load(qtcore.qurl('google.com'))         self.web.show()  app = qtgui.qapplication(sys.argv) main = mainwindow() main.show() sys.exit(app.exec_()) 

for doc, can try riverbank documentation (though code examples still in c…)

it seems code fine (maybe add http://?. did try without classes? should work:

import sys pyqt4.qtcore import * pyqt4.qtgui import * pyqt4.qtwebkit import *  app = qapplication(sys.argv)  web = qwebview() web.load(qurl("http://google.com")) web.show()  sys.exit(app.exec_()) 

otherwise, there problem somewhere else (a proxy maybe?)


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -