The question is pretty straightforward and in the title.
Googling didn't help on this one. How do I get the QFileDialog to use a QValidator on its save name field?
Thanks.
The question is pretty straightforward and in the title.
Googling didn't help on this one. How do I get the QFileDialog to use a QValidator on its save name field?
Thanks.
Copyright © 2021 Jogjafile Inc.
The following is a bit of a kludge but appears to work.
You can use
QObject::findChildrento locate the dialog'sQLineEditchild widgets. Assuming there's only one such widget you can then apply the validator to that...A quick test suggests it appears to work just fine. Like I said though: it does feel like a bit of a kludge.