Hi,

I need to construct a QLineEdit that displays everything in upper-case. In native Qt this can be done via a QValidator using something along the lines

pqUpcaseValidator::pqUpcaseValidator( QWidget* Parent, const char* Name )
     : QValidator( Parent, Name )
     {}

QValidator::State pqUpcaseValidator::validate( QString& Text , int& Pos ) const
     {
     Text = Text.upper();
     return Acceptable;
     }

but how do I do something similar in PyQt, where it's not obvious how you handle strings by reference and also have limited support for modifying strings in-place?Uppercase

Any help/directions are welcome.

Best, Mads



--
+-------------------------------------------------------------+
| Mads Ipsen, Scientific developer                            |
+-------------------------------+-----------------------------+
| QuantumWise A/S               | phone:         +45-29716388 |
| Nørre Søgade 27A              | www:    www.quantumwise.com |
| DK-1370 Copenhagen K, Denmark | email:  m...@quantumwise.com |
+-------------------------------+-----------------------------+


_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to