[PyKDE] KHTML and so on...
Carlo Truijllo
truijllo at supereva.it
Tue Apr 12 16:04:37 BST 2005
Hi guys!
I'm trying to develope a simple automated browser able to print pages in ps
files.
The main goal in my approach are :
1 - render html page
2 - print in a file
In the code below
in line
browser.paint(p,k,0,0) # KHTMLPart object .paint
my appl goes in segfault.
Thanks a lot
Carlo
import sys
from qt import QObject,SIGNAL,SLOT
from qt import *
from kdecore import KApplication,KURL
from kdeui import KMainWindow
from khtml import KHTMLPart
from kdeprint import KPrinter
a = KApplication(['1'],"p4")
vbox = QVBox()
location = QLineEdit(vbox)
location.setText("http://www.repubblica.it")
browser = KHTMLPart(vbox)
browser.openURL(KURL("http://www.repubblica.it"))
l=dir(browser)
k=QRect(0,0,800,600)
p=QPainter()
browser.paint(p,k,0,0)
More information about the PyQt
mailing list