Hi All,

Is there any way to check that the ui elements(line edit,combo box,etc.) of the dialog has been changed.
What I want is to show a message to the user if he changes the value of any single ui element, saying that details have been partially filled.
What i can do is use connect for each ui element & based on the value changed of each element i am setting a boolean flag & at the time of close event i am checking that boolean flag.
But Its quite complicate to check it for each widget.
Is there any easier way.
Code that I am using for single ui element is,
Qt Code:
  1. connect(ui->leAge,SIGNAL(textChanged(QString)),this,SLOT(functChanged())); //In Constructor
  2.  
  3. void DemoDialog::functChanged() //Will be called if value of line edit (ui->leAge) is changed
  4. {
  5. flag=true;
  6. }
  7.  
  8. void DemoDialog::closeEvent(QCloseEvent *event)
  9. {
  10. if (flag) {
  11. if (QMessageBox::warning(this,"Close","Do you want to close?",QMessageBox::Yes|QMessageBox::No)==QMessageBox::Yes) {
  12. this->close();
  13. }
  14. }
To copy to clipboard, switch view to plain text mode 

Thanks in advnc.

Regards,
Rohit