[Qt-interest] Need some help about QLineEdit

Bo Thorsen bo at fioniasoftware.dk
Mon Oct 17 09:46:32 CEST 2011


Den 17-10-2011 09:29, Zeljko skrev:
> Bo Thorsen wrote:
>
>> Den 17-10-2011 08:08, Zeljko skrev:
>>> Girish Ramakrishnan wrote:
>>>> BTW, it looks like you just want a readOnly lineedit? Why would
>>>> someone disable cut/paste/copy in a editable lineedit? (I think
>>>> password mode edits have copy/paste disabled anyway)
>>>
>>> No, I don't wont "readonly" lineedit. I want to know when user
>>> copied/pasted/cutted something in/from QLineEdit and eventually forbid such
>>> op.
>>
>> I intensely hate applications that do this. It's horrible to work with
>> because I might know that what I'm writing will later fill your
>> requirements for the contents of the line edit, but not while I'm typing
>> it. And every single implementation of this kind of user annoyance
>> sucks! Please don't do it.
>>
>> The correct solution is to have a QValidator on the line edit and only
>> enable the OK button (or whatever you do with the line edit) or just
>> ignore the content changes when the validator doesn't accept it.
>>
>> You're on the wrong track here, and the reason you have difficulties
>> implementing your idea is that Qt is designed so well that it's
>> difficult to implement this bad idea.
>
> Bo, I respect your observations, I hate such things too, but customer is
> deciding site , not me :( , so that's why I need that.
> I'll stuck with spaghetti code for this problem.

Ok, I can understand your reason. I have been doing Qt consulting for 
almost 10 years, and sometimes had to do some pretty weird things.

I have, however, at least attempted to get the customer on the right 
track. If I disagree with something, they will be told about it. But 
when they have been told and still want their way, that's just what you 
have to do. They pay the bills, so they get to decide.

I still don't like this, though :)

Bo Thorsen,
Fionia Software.

-- 

Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk



More information about the Qt-interest-old mailing list