[PyKDE] Simple KHtml program crashing at exit

David Boddie david at boddie.org.uk
Thu Aug 11 18:03:49 BST 2005


On Wed, 10 Aug 2005 10:16:32, Ismail Dönmez wrote: 

 I have a very simple Khtml program like this 

...] 

 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() 

...] 

 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 ? 

 looked at some of my own experiments with using KHTML from 
ython, and found that you can at least stop the crash on exit by 
mplementing a close method: 

   def close(self, alsoDelete = 1): 
       return HWidget.close(self, 1) 

ote that it forces the deletion of the widget whether it was 
equested or not. Clearly, it's not a good idea to try and use the 
idget after this has been called. 

o, I expect there may be an issue with object ownership somewhere. 

avid 



___________________________________________________________
$0 Web Hosting with up to 200MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com




More information about the PyQt mailing list