diff --git a/logtools.cpp b/logtools.cpp index 6d7d36fa02ab50402826e1ebaafb638502ac849a..7524ad7d0409d5f61d1441ce030ba2bc5b054d11 100644 --- a/logtools.cpp +++ b/logtools.cpp @@ -282,7 +282,7 @@ void Logtools::logtoolsGetHomePath() void Logtools::logtoolsMessagesBox() { QMessageBox box(QMessageBox::Information, "提示", "该日志文件为空或不存在!"); - box.setButtonText(QMessageBox::OK, QString(" 确 定")); + box.setButtonText(QMessageBox::Ok, QString(" 确 定")); box.exec(); } diff --git a/main.cpp b/main.cpp index 32ec3832593f862c3fd00b78bd3aec5c658b5e8c..decdbc1547ae1fc2794e254238038b41475923db 100644 --- a/main.cpp +++ b/main.cpp @@ -6,6 +6,11 @@ int main(int argc, char *argv[]) { qputenv("XDG_RUNTIME_DIR", "/tmp/runtime-root"); + + if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) { + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + } + QApplication a(argc, argv); //防止进程多开