Important: Please read the Qt Code of Conduct -

On Focus Event alternative? && returning a value from dialog

  • What I am trying to do is make is so when I click a QLineEdit, and keypad Dialog opens. When the user has completed his/her number combination on the keypad and presses ok, I would like the value to be passed back to the main form.

    The only way I have found so far from researching on the net is to use an on focus event, so when the user sets focus on the text box, the box opens. Is there a better way to do this? like a on click event that I am missing for a text box? seems like there should be...

    Also, when I create an instance of a dialog, is there a way to return a value when after the OK button has been pressed on the dialog box and it closes (keypad). Its really nothing I have experimented with before so I am trying to plan before I attack at this one :)

    I am developing on linux / Qt4

Log in to reply