Neat; so he'd set a QRegExp that only accepts input when it has the two decimal points, and he'd reimplement fixup?

If so, it's a better version of my answer => Jesse_mark will still need to subclass

As a side note, I wouldn't be afraid of subclassing. You can fit all of your code into the header file probably:

Qt Code:
  1. #include <QLineEdit>
  2.  
  3. class MyLineEdit :public QLineEdit{
  4. public:
  5. //constructor/destructors go here
  6.  
  7. //something close to this. Syntax might be off a bit
  8. void fixup ( QString & input ) const { input = input.number(input,'f',2);}
  9. };
To copy to clipboard, switch view to plain text mode 

Then just promote in your UI if you need to. It's not scary