[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: No widget returns from plugin
From: Björn Sahlström <kbjorn () users ! sourceforge ! net>
Date: 2003-05-02 14:19:44
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
fredagen den 2 maj 2003 15.33 skrev Tobias Neubert:
> Hi,
>
> now that I managed it to load a self written plugin, I need to get the
> widget which it creates within its constructor. But I get nothing back.
>
> Here is my parts constructor which tries to load and dsiplay the plugin:
>
> --------------------------
> KTrader::OfferList offers = KTrader::self()->query(
> "text/kybernetics", "'Kybernetics/Plugin' in ServiceTypes");
> if (!offers.empty()) {
> KService::Ptr service = offers.first();
> KLibFactory* factory = KLibLoader::self()->factory(
> service->library());
> if (factory) {
> m_pCurrentPlugin = static_cast<KyberneticsPlugin*>(
> factory->create(this, service->name(),
>
> "KyberneticsPlugin")); if (m_pCurrentPlugin) {
> m_pPluginWidget = m_pCurrentPlugin->widget();
> }
> }
> }
> }
>
> ---------------------------------------------------------
>
> The plugin is loaded correctly and the call to widget() seems to be ok too.
> But back into the constructor, there is no widget. Why?
>
> Tobias
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<
Do you set the widget correctly in the plugin ?
KParts::Part::setWidget( .. )
- --
MVH
Björn Sahlström
kbjorn@users.sourceforge.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE+sn6AofGrU7zTgu0RAskeAKDuwsh6JpVcR2Y2NzykNPWsEDZPbACgmhnZ
o+IFQH36rDq7zbhdovacjDI=
=tJQf
-----END PGP SIGNATURE-----
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic