Hi everyone,

I'm having a problem with QDialog. In my main() function I am creating an QDialog with multiple lines and checkBoxes where the user has to enter some information. Afterwards he can either click OK or Cancel.
What I want is: when clicking OK, the program should validate the entered information (e.g. if the necessary boxes were checked). If everything is fine, the information should be accepted and the dialog should close. If not, an error message should appear. After the error message the dialog is shown again with the wrong entered information. So, I don't want to just create a new dialog with empty fields every time, but I want to keep the entered information by the user.
When Cancel is clicked, the dialog should close.

I tried many things but none of them worked. I read about the done()-function, but I am not sure how to use it properly. I hope you can help me.

Thank you!