This is a PyKDE-only function that handles the machinery necessary
to create a KParts::ReadOnlyPart. It executes the following C++ code:
KParts::ReadOnlyPart *createReadOnlyPart (const TQString& lib, TQObject *parent,
const TQString& name, const char *className,
const TQStringList &args)
{
KLibFactory *factory = KLibLoader::self ()->factory ((const char *)lib);
if (factory)
return static_cast<KParts::ReadOnlyPart*> (factory->create (parent,
(const char *)name, className, args));
else
return NULL;
Notice that it takes care of creating the KLibFactory for you, and
returns the part cast to type KParts::ReadOnlyPart. The actual
part has a different class (derived from KParts::ReadOnlyPart),
and calls to openURL or openFile will use the part's overloaded
methods. Currently it isn't possible to call KParts::ReadOnlyPart::openURL
if it has been overloaded.
Usage: KParts.createReadOnlyPart (lib, parent, name, className, args)
|