How to take keyboard input from left to right in a QLineEdit in Pyside?



  • I have an arithmetic application that uses three QlineEdit, two are to display the numbers to be operated on and the last on is where one has to input the answer, however I need to be able to take the input from right to left, at the moment I already have the cursor aligned to the right, but the numbers just push the first numbers to the left .
    I saw these lines of code that might have solved a similar issue but that is in C++ which I don't understand if someone could translate these it might help:

    QKeyEvent e(QEvent::KeyPress, Qt::Key_Direction_R, 0);
    QApplication::sendEvent(this, &e);

    I have also looked at the documentation but I have not been coding for long so I find it difficult to 'stack'
    the proper methods together, a code example would be greatly appreciated, thank you for your time


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.