This commit is contained in:
krad
2021-10-21 15:57:08 +08:00
2 changed files with 7 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
#include "InputObject.h" #include "InputObject.h"
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
#include <src/db/SQLHelper.h> #include <src/db/SQLHelper.h>
#include <QTextCodec>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
//QLocale::setDefault(QLocale::English); //QLocale::setDefault(QLocale::English);
@@ -21,9 +21,9 @@ int main(int argc, char *argv[])
qputenv("QT_VIRTUALKEYBOARD_STYLE", QByteArray("retro")); qputenv("QT_VIRTUALKEYBOARD_STYLE", QByteArray("retro"));
#else #else
qputenv("QT_VIRTUALKEYBOARD_STYLE", QByteArray("default")); qputenv("QT_VIRTUALKEYBOARD_STYLE", QByteArray("default"));
#endif #endif
QTextCodec *codec = QTextCodec::codecForName("utf8");
QTextCodec::setCodecForLocale(codec);
//a.installEventFilter(obj); //a.installEventFilter(obj);
InputObject *obj = new InputObject(); InputObject *obj = new InputObject();
a.installEventFilter(obj); a.installEventFilter(obj);

View File

@@ -10,12 +10,12 @@ TabFormWidget::TabFormWidget(QWidget *parent) :
QPixmap img(":/icons/logo.png"); QPixmap img(":/icons/logo.png");
ui->logo->setPixmap(img.scaledToHeight(33,Qt::SmoothTransformation)); ui->logo->setPixmap(img.scaledToHeight(33,Qt::SmoothTransformation));
ui->company->setText(QString::fromLocal8Bit("浙江衡玖医疗科技")); ui->company->setText(tr("浙江衡玖医疗科技"));
ui->lbl_msglogo->setPixmap(QPixmap(":/icons/msg.png").scaledToHeight(26,Qt::SmoothTransformation)); ui->lbl_msglogo->setPixmap(QPixmap(":/icons/msg.png").scaledToHeight(26,Qt::SmoothTransformation));
// ui->lbl_patlogo->setPixmap(QPixmap(":/icons/patient.png").scaledToHeight(26,Qt::SmoothTransformation)); // ui->lbl_patlogo->setPixmap(QPixmap(":/icons/patient.png").scaledToHeight(26,Qt::SmoothTransformation));
ui->spacer_2->setVisible(false); ui->spacer_2->setVisible(false);
QLabel* hosp = new QLabel(this); QLabel* hosp = new QLabel(this);
hosp->setText(QString::fromLocal8Bit("浙江大学医学院附属第二医院 ")); hosp->setText(tr(""));
QLabel* nowDate = new QLabel(this); QLabel* nowDate = new QLabel(this);
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")); nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
QLabel* linkIcon = new QLabel(this); QLabel* linkIcon = new QLabel(this);
@@ -42,7 +42,7 @@ TabFormWidget::TabFormWidget(QWidget *parent) :
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")); nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
if (!msg) return; if (!msg) return;
QString* s = (QString*)msg; QString* s = (QString*)msg;
lockIcon->setText(QString("%1%2").arg(*s).arg(QString::fromLocal8Bit("°C"))); lockIcon->setText(QString("%1%2").arg(*s).arg(tr("°C")));
}); });
} }