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

List:       kde-devel
Subject:    Re: Disabling widget hirarchy
From:       Matthias Ettrich <ettrich () troll ! no>
Date:       1999-09-30 13:36:18
[Download RAW message or body]

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

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

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