[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Disabling widget hirarchy
From:       Espen Sand <espensa () online ! no>
Date:       1999-09-30 14:36:54
[Download RAW message or body]

Aha, I am still using 2.0.1 and was trying to gray out a hierarchy with
QWidget::setEnabled. The "next to trivial" thing is only valid if one don't
care if any children should remain grayed out etc ;)


On Thu, 30 Sep 1999, Matthias Ettrich wrote:
> On Thu, 30 Sep 1999, Espen Sand wrote:
> > Anybody knows if there exist a method for disabling/enabling 
> > (ie, graying out) a widget hierarchy? Any Qt method?
> > It is next to trivial to implement. I believe this is a method that could be
> > useful in a central lib. 
> > 
> > Perhaps some util file in kdeui? kutil?
> 
> Qt HEAD (the development snapshots/ public CVS ) does this with a simple
> call to QWidget::setEnabled(bool)
> 
> /*! 
>   [....}
>   Disabling a widget implicitely disables all its children.  Enabling
>   respectively enables all child widgets unless they have been
>   explicitely disabled.
>   [....}
> */
> 
> Unfortunately the change was a bit too heavy to be put into Qt-2.0.2, but it
> will most certainly be in Qt-2.1.
> 
> It's almost next to trivial. The only problem is to keep tack of explictely
> disabled widgets (which required a new widget state flag). You may check the
> code in qwidget.cpp
> 
> Matthias
> 
> 
> > 
> > -- 
> > Espen Sand
-- 
Espen Sand

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic