[Kwintv] Plugin access to the UI - more problems
George Staikos
staikos at kde.org
Mon Jun 2 03:23:56 CEST 2003
On Sunday 01 June 2003 09:29, Zsolt Rizsanyi wrote:
> I have ventured further in making the some actions accessible from the
> telex plugin, but have run in a new problem, though it is quite similar.
>
> The gui is not (yet) created when the plugins are initialized.
> So I dont know how to add an action to one of its toolbars.
>
> I tried something like this (tta is an KAction):
>
> KXMLGUIFactory* gui = driver()->guiFactory();
> if (gui) {
> QWidget* widget = gui->container("viewToolBar", NULL);
> if (widget)
> tta->plug(widget);
> else
> kdDebug() << "No 'viewToolBar' widget" << endl;
> }
>
> But this always prints No 'viewToolBar' widget...
>
> Could you please advise a way how to do this?
Argh this is a never-ending cycle here. :-) Ok I might have to find a way
to delay plugin initialisation then, maybe through a single-shot timer in
QtVision*. I'll play with it and try to commit a new attempt.
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the kwintv
mailing list