[bt-devel] Qt question
Troy A. Griffitts
bt-devel@crosswire.org
Fri, 08 Feb 2002 02:15:37 -0700
Hey guys. Can you help me with a Qt question?
Should this work for displaying unicode?
QFont uniFont("unifont");
uniFont.setCharSet(QFont::Unicode);
textDisplay->setFont(uniFont);
...
int verse = key->Verse();
int chapter = key->Chapter();
int book = key->Book();
key->Verse(1);
QString text = "<html><body>";
for (key->Verse(1); ((key->Chapter() == chapter) &&
(key->Book() == book)); (*currentText)++) {
text += "<font color=\"#0000ff\"><small>" +
QString::number(key->Verse()) + "</small></font>";
if (key->Verse() == verse)
text += "<font color=\"#00ff00\">";
text += QString::fromUtf8(((const char *)*currentText)) +
" ";
if (key->Verse() == verse)
text += "</font>";
}
text += "</body></html>";
textDisplay->setText(text);
I just get squares where greek text should be. Latin comes out fine.
Thanks!
-Troy.