We traced through the code for
QInputDialog::getText() and these are hints which are intended to be
processed in the platform plugin. A few of the hints are handled for cocoa but none of them are processed on windows or xcb.
From our research the purpose of QInputMethod (which is the class that handles the hint) was designed to deal with configuring a virtual keyboard. For a desktop application the proper way to constrain input or use a mask is with a validator.
For a line edit you can use
QLineEdit::setInputMask() or
QLineEdit::setValidator(). Here is a a quick example that will work in CopperSpice.
Code: Select all
// any alpha char, any number
auto regex = new QRegularExpressionValidator( QRegularExpression("[\\d\\l\\u]*") );
lineEdit->setValidator(regex);
Barbara