This part suggests to me, that there is a problem with the focus, which then might explain why you don't see the cursor.when i press the tab, the backspace key functionality is not working.But backspace functionality is working well for otherkeys.
may be the focus problem affects this also. So, when pressing the tabkey, how to set the focus on the lineedit?
Tab should shift focus to the next tab index widget, but your code only gets the current focused widget - maybe that is the problem.
Bookmarks