|
2014-04-05
, 08:48
|
Posts: 2,291 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#12
|
Thanks for bringing my attention to this thread.
Looks easy. Let me have a look. I can send you my updates by email.
|
2014-04-05
, 13:00
|
|
Posts: 6,450 |
Thanked: 20,982 times |
Joined on Sep 2012
@ UK
|
#13
|
The Following 4 Users Say Thank You to pichlo For This Useful Post: | ||
|
2014-04-05
, 16:32
|
|
Posts: 6,450 |
Thanked: 20,982 times |
Joined on Sep 2012
@ UK
|
#14
|
|
2014-04-05
, 16:56
|
Posts: 203 |
Thanked: 445 times |
Joined on Mar 2010
|
#15
|
The Following 2 Users Say Thank You to foobar For This Useful Post: | ||
|
2014-04-05
, 17:54
|
Posts: 1,427 |
Thanked: 2,626 times |
Joined on Jan 2011
@ Touring
|
#16
|
|
2014-04-05
, 18:27
|
|
Posts: 6,450 |
Thanked: 20,982 times |
Joined on Sep 2012
@ UK
|
#17
|
|
2014-04-05
, 18:52
|
Posts: 203 |
Thanked: 445 times |
Joined on Mar 2010
|
#18
|
How does that help? The characters show OK in the source (in Leafpad).
They show muddled up in the compiled app, like this:
The Following User Says Thank You to foobar For This Useful Post: | ||
|
2014-04-05
, 18:54
|
|
Posts: 1,986 |
Thanked: 7,698 times |
Joined on Dec 2010
@ Dayton, Ohio
|
#19
|
A silly question, but does anyone know how to make Qt controls display characters like μ and Ω? Particularly QComboBox, if that makes any difference. When I just paste the characters in the source, rebuild and run the app, I get ̼A and k̩ intead of μA and kΩ.
QString testString("Test of ohm char: "); testString += QChar(0x2126); ui->indicatorBrightnessComboBox->addItem(testString); QString testString2("Test of mu char: "); testString2 += QChar(0x00B5); ui->indicatorBrightnessComboBox->addItem(testString2);
Occasionally it seems the simplest solution is just to insert those strings in their native form in the sources - this is unfortunately rarely a good solution. While the strings might look correct in an editor, the compiler and target platform might interpret them differently. The recommendation is thus to *always* avoid putting non-ASCII string is the sources.
The Following 5 Users Say Thank You to Copernicus For This Useful Post: | ||
|
2014-04-06
, 06:42
|
|
Posts: 6,450 |
Thanked: 20,982 times |
Joined on Sep 2012
@ UK
|
#20
|
static void initMultipliersResistance(QComboBox *qcb) { qcb->clear(); qcb->addItem(QString::fromUtf8("Ω"), 1); qcb->addItem(QString::fromUtf8("kΩ"), 1e3); qcb->addItem(QString::fromUtf8("MΩ"), 1e6); qcb->addItem(QString::fromUtf8("GΩ"), 1e9); qcb->addItem(QString::fromUtf8("TΩ"), 1e12); qcb->setCurrentIndex(0); }
The Following 3 Users Say Thank You to pichlo For This Useful Post: | ||
IDK how easy/hard the above would be to code in GUi, though.
/Estel
// Edit
This way, instead of different main menu items for law and power, we could have one "calculations" menu item, and specific calculations could be shown as tabs (instead of current tabs for "what you want to get as a result"). So we would have Ohm's law tab, power tab, etc...
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!