[Qt-interest] Need some help about QLineEdit
Zeljko
zeljko at holobit.net
Mon Oct 17 09:29:02 CEST 2011
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.
zeljko
More information about the Qt-interest-old
mailing list