[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Should widgets emit sigals on set* calls?
From: David Faure <david () mandrakesoft ! com>
Date: 2002-01-22 19:51:46
[Download RAW message or body]
On Tuesday 22 January 2002 20:40, Michael Häckel wrote:
> On Tuesday 22 January 2002 20:16, Wilco Greven wrote:
> >
> > The signal should be emitted. What if two objects interact with the
button.
> > If one object changes the color, the other still wants to be notified
about
> > that change. The button should only emit the signal if the color really
got
> > changed by setColor.
>
> At least in Qt this works now different at several places.
>
> For example QListView->setCurrentItem() does no longer emit a
currentChanged()
> signal.
But QLineEdit::setText() still emits textChanged(), etc.
Tricky problem.
In KAction we also removed all signal emissions from setter methods, this was
bringing far too much trouble.
I'm afraid there isn't a perfect solution to this, it depends on the classes,
and needs to be documented appropriately in all cases.
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david, http://www.konqueror.org
KDE 3.0: Konquering the Desktops
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic