I have a clickable lineEdit:
> class ClickableLineEdit(QtGui.QLineEdit): #This is the Class which let you to have a clickable QLineEdit
clicked = QtCore.pyqtSignal()
def mousePressEvent(self, event):
self.clicked.emit()
QtGui.QLineEdit.mousePressEvent(self, event)
Which it clears the default text after a click:
self.lineEdit = ClickableLineEdit(Form)
self.lineEdit.setText(_translate("Form", "0.14286", None)) #Carrying the default value of QLineEdit.
self.lineEdit.clicked.connect(self.lineEdit_refrac.clear)
How to change my code to set the QlineEdit's behavior to normal after the first click?
It means after the lineEdit is cleared, now I want the user can click for editing purposes on the input text.