> I've no clue what a "rubber" button is. But something to clear the field would
be useful.

A rubber :P you use it to delete things you wrote with a pencil. Take a look at
the Eclipse option dialog, there's a small rubber inside the search box.

> I don't know whether we can use it as it was only introduces 
> in Qt 4.3. Then I started wondering why such a basic feature 
> was introduced this late.
> 
> We support Qt versions from 4.2.2.

Well, then maybe it's better to leave the check on the flags. isDisabled is more
elegant, but I find the initial solution is understandable too.

> > About the "if else if else if..." question:
> > 
> >>>> This is really ugly, but I can't think of how to solve 
> it right now.
> > 
> > I know, see my comment. I asked on #Qt [1] and this seems 
> to be the best
> > solution. If we want something more clean and OO we should 
> subclass each widget
> > we want to be searchable, but it's not a good solution 
> IMHO. It would be
> > interesting to have somthing in QWidget like 
> QWidget::ToString() or even
> > QObject::ToString(), like in .Net.
> > 
> 
> Maybe we should make the individual panels of a type Panel, 
> and then add a function addWidget(QWidget * widget, QString 
> search_string). So, we just supply the string everytime we 
> add a widget to a panel. Then we don't need this large 
> if..else part, we don't need the casts and maybe we can use a
> smart way to use them for searching and speed up the search. 
> Iterating over all widgets seems a bit too much work.

Maybe we should KISS the problem and limit the search to labels, checkboxes,
groupboxes and buttons. Probably the most time-consuming part is searching in
listboxes, comboboxes and textboxes. IMHO it makes sense to search just in the
description rather than in description (QLabel, QCheckBox, QGroupBox...) and
values (QLineEdit, QComboBox...).
With your solution we should make something like a concatenation of the contents
of the combo/listboxes, which is a really bad solution IMO. Moreover we're using
.ui files to create the various option panes so we can't customize the calls to
addWidget, as they are in ui_*.h files, generated by the uic tool. Or am I
missing something?

venom00

Reply via email to