Input Dialog with Check Box?
Hey all,
I want to make a dialog that won't show itself in the future if the user selects a check box.
The trouble is how to put a checkbox in a dialog. I looked at QInputDialog, but didn't see anything for checkboxes. I also looked at QMessageBox, but don't know how to sneak a checkbox in.
Is there any way easier or more straightforward than using QDialog? If not, how would I go about it? Sorry, complete newbie here.
-PtP
Re: Input Dialog with Check Box?
You can subclass the input dialog
Re: Input Dialog with Check Box?
Or you can use QErrorMessage.
Re: Input Dialog with Check Box?
Thanks. This is very helpful. I did not know that you could subclass the input dialog. This forum is great. Thanks for taking the time to answer the question posted here.
Re: Input Dialog with Check Box?
Since the dialog is simple, I just decided to go the default route and subclass QDialog.
The only thing I am wondering is how to return an integer from QDialog::exec(). Or should have I subclassed QInputDialog?
Thanks!
Re: Input Dialog with Check Box?
The exec() function returns one of two possible values:
http://doc.trolltech.com/latest/qdia...ialogCode-enum
Do you want to change this? If so, why?