KToggleToolBarAction?

Ellis Whitehead kde at ellisw.net
Wed Apr 3 20:33:45 BST 2002


On Wednesday 03 April 2002 09:05, Guillaume Laurent wrote:
> On Wednesday 03 April 2002 16:10, Ellis Whitehead wrote:
> > On Wednesday 03 April 2002 01:05, John Firebaugh wrote:
> > > How do I get a pointer to the main window from plug()? Follow parents
> > > until I find one that inherits("KMainWindow")?
> >
> > Exactly.
>
> Can't you use QWidget::topLevelWidget() ?

I don't know if this has changed for Qt 3.x, but in 2.x topLevelWidget() 
didn't always go back far enough.  I'm not basing this on personal 
experience, though, and I don't know where it would get stuck.  KDialog? 
Anyhow, there's a note about it in kaction.cpp, and the KAction API used to 
have a findMainWindow() method to deal with the problem.

Cheers,
Ellis




More information about the kde-core-devel mailing list