View Full Version : Reading from line edit

23rd October 2011, 07:34
I have a stacked widget structure in my program. In one of the widgets i have a line edit element in which an external device that pastes a string onto. I use a lineEdit_textchanged function to capture the lineedit value(i use this later in the program) & switch to the next widget. The problem is that the textchanged function switches before the device finishes inputting the whole string. Is there a workaround this issue.

Thank you in advance.

24th October 2011, 01:04
I assume the external device is keyboard stuffing so textChanged() is called for each input character just as if you were typing it yourself. Either use editingFinished() if the device triggers it (by Tab or Enter) or set a strict validator/and or input mask and only react to textChanged() if hasAcceptableInput() is true.

24th October 2011, 22:51
Try using the "editingFinished()" signal, instead.