You'll need to subclass it IIRC.
Off the top of my head the pseudo code looks like this:
connect(textEdit event, qlineeditsubclass::mysupercoolslot)
qlineeditsubclass::mysupercoolslot()
{
setCurrentDisplayedString
([B
]QString(get <CURR_STRING>,
'f',
2)[/B
]);
}
connect(textEdit event, qlineeditsubclass::mysupercoolslot)
qlineeditsubclass::mysupercoolslot()
{
setCurrentDisplayedString([B]QString(get <CURR_STRING>,'f',2)[/B]);
}
To copy to clipboard, switch view to plain text mode
QString::number(<CURR_STRING>,'f',2)
Where get <CURR_STRING> is just asking the QLineEdit for a copy of its string, 'f' says you want floating point format, and '2' says you want 2 decimal places.
Works like a charm.
Bookmarks