[PyKDE] KPart problem
david at boddie.org.uk
Sun Jul 24 22:17:35 BST 2005
On Sun Jul 24 21:28:38 MEST 2005, Roberto Alsina wrote:
> And here's my attempt:
> def main(args):
> factory = kdecore.KLibLoader.self().factory( "libkonsolepart" );
> I'm getting that p has no widget member.
> Any ideas?
It looks like the QObject returned from factory.create(win) isn't getting
converted to the proper subclass. Although it may be possible to implement
the correct behaviour in PyKDE, there is an alternative approach: simply
replace the lines
factory = kdecore.KLibLoader.self().factory( "libkonsolepart" );
p = kparts.createReadWritePart("libkonsolepart", win, "konsole",
The syntax for this convenience function is
createReadWritePart(lib, parent, name, className, args)
and I think I've chosen the correct library and class names for your example.
Hope this helps,
More information about the PyQt