[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Thesaurus KDataTool
From: David Faure <david () mandrakesoft ! com>
Date: 2001-11-12 0:32:01
[Download RAW message or body]
On Dimanche 11 Novembre 2001 22:28, Daniel Naber wrote:
> On Sunday 11 November 2001 15:31, David Faure wrote:
>
> > Try (QPopupMenu*)factory()->container("tools",this) (where this is the
> > KWView) That's what we use to get hold of RMB-popupmenus defined in an
> > XML-UI file, I think it also works with menubar-popupmenus.
>
> I don't find a place where QPopupMenu*)factory() does not return 0, i.e.
factory(), you mean ? The QPopupMenu cast is for the result of container().
This is best written as
static_cast<QPopupMenu*>(factory()->container("tools",this))
> the code above will crash when used in KWView's constructor or
> KWView::createGUI etc.
We use factory()->container() for the RMB popupmenus, in KWView too,
and it works fine. I guess you're doing this too early, if container() can't find it.
Or do you really mean it's factory() that's 0 ?
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE 3.0: Konquering the Desktops
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic