[PyKDE] KDE app template: Qt signal problem...

Simon Edwards simon at simonzone.com
Thu Apr 28 07:36:23 BST 2005


On Tuesday 26 April 2005 23:15, Jim Bublitz wrote:
> In testapp.py, KParts want to reside in a KParts.MainWindow, not a 
> KMainWindow.  That means you'd need to provide an argument to createGUI as 
> well, which would be the part being displayed in the main window.
> 
> Also, self._html is a KParts.ReadOnlyPart, which doesn't offer the signals 
> you're trying to connect to. You should be able specify the class type in 
the 
> createReadOnlyPart call (rather than using the default), or else try 
sip.cast 
> to cast it to the type that offers the signals you want (not sure what 
you're 
> going for here).

I seem to have the signal problems sorted out. But nothing is displayed in the 
window (need KParts.MainWindow?), which doesn't make sense since the code is 
based on the C++ app generated by KDevelop. It works and doesn't use 
KParts.MainWindow. Using KHTMLPart directly works though.

I updated the code at:

http://www.simonzone.com/software/python/kdeapp.tar.bz2

Also, you can't do multiple inheritence with PyQt/PyKDE which makes it a bit 
hard to add the DCOP interface to testapp in the same way as in the C++ 
version. But I've got a cunning plan to fix that. ;)

Thanks for your help Jim.

cheers,

-- 
Simon Edwards             | Guarddog Firewall
simon at simonzone.com       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."




More information about the PyQt mailing list