KClearableLineEdit

Jaroslaw Staniek js at iidea.pl
Wed Aug 23 20:49:30 BST 2006


Aaron J. Seigo said the following, On 2006-08-23 20:28:

> On Wednesday 23 August 2006 6:26, Jaroslaw Staniek wrote:
> 
>>Nice improvement. One note: what if I have already reimplemented KLineEdit
>>(or want to add the 'clear' button to aneditable combo box or date/time
>>edit?
> 
>  
> if they use a KLineEdit or have the ability to have the QLineEdit they use set 
> (as qcombobox does) this shouldn't be a problem.
> 
> 
>>class KClearableLineEdit : public KLineEdit, KClearableInterface
> 
> 
> i don't see how this could be made an interface, to be honest. if you look at 
> the code it hooks into mouse and resize events and is pretty specific in 
> placement to how a lineedit is laid out. probably easier/saner to just add 
> the 30 or so lines of code necessary to each widget to make this happen.

Hmm, what about putting the lines in a template? Ooh, too bad... QLineEdit has 
no all the usable virtuals like clear()...

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice: http://www.kexi-project.org, http://www.koffice.org
  KDE3 & KDE4 Libraries for MS Windows: http://kdelibs.com, http://www.kde.org




More information about the kde-core-devel mailing list