Centralize tree-filter class?

Benjamin Meyer ben at meyerhome.net
Thu Jul 13 00:06:58 BST 2006


On Monday 10 July 2006 10:27 pm, John Tapsell wrote:
> Sorting by child added only 2 lines of code (to call sort recursively)
> compared to the 20 lines of other specific code in there.  I don't see
> the point :)
>
> What _is_ really needed in an equivalent for KSearchLine for kde4.
> Just a text box with the "search:" label and the  |x>  button.  It
> should just emit a signal when changed.

When using a model and sort filter proxy model to create KSearchLine is little 
more then just connecting the label's text changed singal to the proxy's set 
text slot.  Hardly worth having a whole class in kdelibs.  When using the 
convenience views (QTableWidget, QTreeWidget and QListWidget) they can't take 
a QSortFilterProxyModel so you are forced to either remove items or hide them 
when filtering which can either be ugly of really slow and class to deal with 
it might be handy.  The main advantage of those classes is their convenience 
API, but in 4.2 QStandardItemModel has a good convenience API and I would 
highly recommend using it (or your own model) over the tree and list widgets. 

-Benjamin Meyer

-- 
aka icefox
Public Key: http://www.icefox.net/public_key.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060713/b8fecad4/attachment.sig>


More information about the kde-core-devel mailing list