如何显示像 theta 这样的数学符号
How to show math symbols like theta
我正在尝试找到一种方法来显示数学符号,例如 \theta、\phi、\dot{\theta}...等。我找不到一种方法来显示这些字母我的阴谋。 qcustomplot
是否支持数学符号?我试过下面一行,但很少有字母出现,但其余的没有。
ui->customPlot1->graph(0)->setName(QString("\u0024"));
您要找的是:
ui->customPlot1->graph(0)->setName(QString::fromUtf8("\u03B8"));
例如,这将为您提供小写字母 theta。使用 UTF-8 Encoding Table and Unicode Characters 获取您想要的字母代码。
在 Windows 7 中的 Qt GUI 中,以下行有效
title->setText(QString::fromWCharArray(L"\u03B8\u2081(t) vs \u03B8\u2081\u1d48(t)"));
结果是
其中\u03B8
为\theta
,\u2081
为下标一,\u1d48
为下标d。其余字符,参见this link。
我正在尝试找到一种方法来显示数学符号,例如 \theta、\phi、\dot{\theta}...等。我找不到一种方法来显示这些字母我的阴谋。 qcustomplot
是否支持数学符号?我试过下面一行,但很少有字母出现,但其余的没有。
ui->customPlot1->graph(0)->setName(QString("\u0024"));
您要找的是:
ui->customPlot1->graph(0)->setName(QString::fromUtf8("\u03B8"));
例如,这将为您提供小写字母 theta。使用 UTF-8 Encoding Table and Unicode Characters 获取您想要的字母代码。
在 Windows 7 中的 Qt GUI 中,以下行有效
title->setText(QString::fromWCharArray(L"\u03B8\u2081(t) vs \u03B8\u2081\u1d48(t)"));
结果是
其中\u03B8
为\theta
,\u2081
为下标一,\u1d48
为下标d。其余字符,参见this link。