From: Bogdan M. <dag...@gm...> - 2011-02-14 16:03:29
|
On Mon, Feb 14, 2011 at 5:40 PM, rusirus <rus...@qc...> wrote: > While developing my plugin I've encountered an issue with representing > the degree character on different platforms. When I enter a degree > character into my code under Windows, I then can't edit the code under > QT (or gedit) in Linux without first choosing an appropriate encoding. > But then, when I go back to Windows, I get a spurious A (with the double > oo for Angstrom) next to the degree character. > > I notice that Stellarium manages to represent the degree in its UI with > no problem so is there a uniform way to represent this character under > Windows, Linux and Mac? Look at the code of the AngleSpinBox class, if you mean that. http://www.stellarium.org/doc/head/classAngleSpinBox.html Off the top of my head, the way to do it is to use the QString::arg() thing with an argument a QChar with the Unicode value of the degree symbol. Regards, Bogdan Marinov |