Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
On-Screen Keyboard, QDateTimeEdit, QLineEdit
samus8zero2x last edited by
I am working with an on-screen keyboard widget for our embedded app. I have switched it over to use the KeyEvent system, but I have some issues I need worked out involving the QDateTimeEdit (or QDateEdit or QTimeEdit) and QLineEdit:
- If a block of text is highlighted, the key character is placed after the cursor position but the highlighted text block is kept.
- With QDateTimeEdit, the selected section does not update properly. Highlighting the number and typing '1' normally displays just a '1,' but with the on-screen keyboard, the number either changes to "00" or "01" and the number is then highlighted.
I have a feeling some property is lost (such as selected text block) when focus is switched to and from a control. Is there a way to prevent the focus from changing when a key is pressed on the on-screen keyboard? If I set the keyboard and all buttons to "Qt::NoFocus" the focus still lost from the target text widget.