Any way i have solved by connecting the signals of the lineEdit to slot almost the same way as you said. But i want to know is there a better solution ?