更新文档
This commit is contained in:
@@ -207,7 +207,7 @@ void CpuMemoryLabel::readData()
|
||||
|
||||
void CpuMemoryLabel::setData()
|
||||
{
|
||||
cpuPercent = (cpuPercent < 0 ? 0 : cpuPercent);
|
||||
//cpuPercent = (cpuPercent < 0 ? 0 : cpuPercent);
|
||||
cpuPercent = (cpuPercent > 100 ? 0 : cpuPercent);
|
||||
QString msg = QString("CPU %1% Mem %2% ( 已用 %3 MB / 共 %4 MB )").arg(cpuPercent).arg(memoryPercent).arg(memoryUse).arg(memoryAll);
|
||||
if (showText) {
|
||||
|
||||
@@ -132,8 +132,10 @@ void IconHelper::setStyle(QWidget *widget, QList<QAbstractButton *> btns,
|
||||
IconHelper::IconHelper(const QString &fontFile, const QString &fontName, QObject *parent) : QObject(parent)
|
||||
{
|
||||
//判断图形字体是否存在,不存在则加入
|
||||
//这里暂时限制在同一个项目中只加载一次字体文件
|
||||
QFontDatabase fontDb;
|
||||
if (!fontDb.families().contains(fontName) && QFile(fontFile).exists()) {
|
||||
bool exist = false;//fontDb.families().contains(fontName);
|
||||
if (!exist && QFile(fontFile).exists()) {
|
||||
int fontId = fontDb.addApplicationFont(fontFile);
|
||||
QStringList listName = fontDb.applicationFontFamilies(fontId);
|
||||
if (listName.count() == 0) {
|
||||
|
||||
Reference in New Issue
Block a user