Hello Guys ,I am trying to make an program with the use of a normal keypad instead of a keyboard . And I am doing it in linux environment , using a imx53 board. What i can do now is jus make the keypad type in just one line edit without even focusing on the lineEdit at all .Here is the codes
Qt Code:
  1. void LoginGui::CheckKeypadPressed()
  2. {
  3. if(key_Available()==1)
  4. {
  5. int CheckNumber;
  6. CheckNumber=key_Get();
  7.  
  8. if(CheckNumber==1)
  9. {
  10. ui->password->setText(ui->password->text()+"1");
  11. }
  12. if(CheckNumber==2)
  13. {
  14. ui->password->setText(ui->password->text()+"2");
  15. }
  16. if(CheckNumber==3)
  17. {
  18. ui->password->setText(ui->password->text()+"3");
  19. }
  20. if(CheckNumber==4)
  21. {
  22. ui->password->setText(ui->password->text()+"4");
  23. }
  24. if(CheckNumber==5)
  25. {
  26. ui->password->setText(ui->password->text()+"5");
  27. }
  28. if(CheckNumber==6)
  29. {
  30. ui->password->setText(ui->password->text()+"6");
  31. }
  32. if(CheckNumber==7)
  33. {
  34. ui->password->setText(ui->password->text()+"7");
  35. }
  36. if(CheckNumber==8)
  37. {
  38. ui->password->setText(ui->password->text()+"8");
  39. }
  40. if(CheckNumber==9)
  41. {
  42. ui->password->setText(ui->password->text()+"9");
  43. }
  44. }
To copy to clipboard, switch view to plain text mode 
What i am going to do now is to have 2 line edit . And i want to use the keypad for 2 line edits , Currently the Codes i have can't even use for 2 line edit .
What i am thinking is making an "if" statement to focus on 2 different line edits . I am do not know how to do this , Please Help me