KClearableLineEdit

Aaron J. Seigo aseigo at kde.org
Wed Aug 23 08:27:57 BST 2006


attached is a class that implements a line edit with an embedded clear button. 
the intention is to replace all those lineedits with the clear button next to 
them. why?

a) they currently look ugly by breaking layouts out
b) they unnecessarily increase the visual noise with More Buttons
c) being external to the line edit they are currently not very well associated 
with the widget they act upon.

the only downside to this new class (besides bugs i am not aware of and some 
unwanted flickering on resizing, all of which are fixables as issues arise) 
is that i'm not sure what the accessibility impact would be; worst case is 
that this class would need to export via QAccessible that it has a clear 
function? not sure ... 

i also implemented this as a subclass of KLineEdit rather than embed the 
functionality into KLineEdit since KLineEdit is already a pretty hairy beast 
and i didn't want to add to that.

-- 
Aaron J. Seigo
Undulate Your Wantonness
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kclearablelineedit.cpp
Type: text/x-c++src
Size: 3275 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060823/4ccbe45a/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kclearablelineedit.h
Type: text/x-c++hdr
Size: 1953 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060823/4ccbe45a/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clearable_lineedit.png
Type: image/png
Size: 1865 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060823/4ccbe45a/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060823/4ccbe45a/attachment.sig>


More information about the kde-core-devel mailing list