Hi All,
I have two QlineEdit widgets in my application and I want delete the characters when I press the Backspace key (I´m using a Windows Standard mobile device). When I enter characters and press Backspace, they are deleted one by one, as expected. The problem is when a move to the other QLineEdit which has already characters entered, when I press Backspace key all the characters are deleted, instead of one by one. One workaround is entering any character and then Backspace key will work correctly. Additionally, in this case, when I press Left/Right arrow key, the cursor does not move, it remains in the last character at the right.
Here is the code that I use to delete characters:
void BackspaceKeyNotification()
{
if(qlineedit1->hasFocus())
{
qlineedit1->backspace();
}
else if(qlineedit2->hasFocus())
{
qlineedit2->backspace();
}
}
void BackspaceKeyNotification()
{
if(qlineedit1->hasFocus())
{
qlineedit1->backspace();
}
else if(qlineedit2->hasFocus())
{
qlineedit2->backspace();
}
}
To copy to clipboard, switch view to plain text mode
Can someone tell me why the backspace() function deletes all characters when I move to another QLineEdit?
Thanks in advance!
Bookmarks