[PyKDE] Simple KHtml program crashing at exit
İsmail Dönmez
ismail at uludag.org.tr
Wed Aug 10 08:16:32 BST 2005
Hi all,
I have a very simple Khtml program like this
==========
demo.py:
==========
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from qt import *
from hwidget import HWidget
import khtml
from kdecore import KApplication, KCmdLineArgs, KAboutData
class HtmlWidget(HWidget):
def __init__(self, parent=None, name="Html Widget", fl=0):
HWidget.__init__(self,parent,name,fl)
self.khtmlPart = khtml.KHTMLPart(self.displayFrame)
self.khtmlPart.begin()
self.khtmlPart.write("<b>Testing Baby!</b>")
self.khtmlPart.end()
self.khtmlPart.view().resize(420,300)
self.khtmlPart.show()
if __name__ == "__main__":
import sys
app = KApplication (sys.argv, "test")
hw = HtmlWidget()
app.setMainWidget(hw)
hw.setCaption("Html Widget")
hw.show()
app.exec_loop()
========================
hwidget.py: ( Auto-generated by pyuic)
========================
from qt import *
class HWidget(QWidget):
def __init__(self,parent = None,name = None,fl = 0):
QWidget.__init__(self,parent,name,fl)
if not name:
self.setName("HWidget")
self.displayFrame = QFrame(self,"displayFrame")
self.displayFrame.setGeometry(QRect(40,30,421,301))
self.displayFrame.setFrameShape(QFrame.StyledPanel)
self.displayFrame.setFrameShadow(QFrame.Raised)
self.languageChange()
self.resize(QSize(492,376).expandedTo(self.minimumSizeHint()))
self.clearWState(Qt.WState_Polished)
def languageChange(self):
pass
But at exit program crashes with a reference to KInstance::config I tried
adding KCmdLineArgs to the app thinking that would be the problem but that
didn't result in any change. So I wonder if anyone has any idea about this
problem ?
Regards,
ismail dönmez
More information about the PyQt
mailing list