0

When using setInputMask the text-cursor width changes. Due to that I can't place the cursor between two characters but it selects the whole character. Is there a way to bypass this behaviour?

easysaesch
  • 159
  • 1
  • 14
  • I just took an [old sample](https://stackoverflow.com/a/47532007/7478597) of mine to verify your observation. It seems that the Qt authors decided to do so as inserting characters may move following characters backwards which in turn may violate format of input mask. The Qt doc. suggests a possible alternative: _Validators can be used instead of, or in conjunction with masks; see [setValidator()](http://doc.qt.io/qt-5/qlineedit.html#setValidator)._ I assume, with a validator you can provide free editing as intended. – Scheff's Cat Apr 19 '18 at 13:29
  • I haven't tried that yet, thanks. – easysaesch Apr 19 '18 at 13:36

0 Answers0