Reset all of the widgets in QDialog

  • Hi,
    What is the best way of resetting all the widgets to default value in a QDialog?
    I tried


    but this did not clear Qlabel displaying an image and froze the dialog.
    Thank you for your help.

  • Qt Champions 2017

    The best way would be to close the dialog
    and create a new one again. (from outside)

    Alternative make a new function
    that set the default values and call that when u want to "reset"

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.