From 714282238a61c04d98b5f4e02e3a36fa65c2cbc5 Mon Sep 17 00:00:00 2001 From: feiyangqingyun Date: Mon, 22 Nov 2021 15:02:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- video/videobox/videobox.cpp | 4 +++- video/videopanel/videobox.cpp | 4 +++- widget/screenwidget/frmscreenwidget.cpp | 1 + widget/screenwidget/main.cpp | 4 ++++ widget/screenwidget/screenwidget.cpp | 2 +- 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b680d0a..928f7fb 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ | tool | 工具类别 | comtool | **串口调试助手** | | tool | 工具类别 | nettool | **网络调试助手** | | tool | 工具类别 | netserver | **网络中转服务器** | -| tool | 工具类别 | base64helper | 图片文字转base | +| tool | 工具类别 | base64helper | **图片文字转base** | | tool | 工具类别 | countcode | **代码行数统计工具** | | tool | 工具类别 | emailtool | 邮件发送工具 | | tool | 工具类别 | moneytool | 存款利息计算器 | diff --git a/video/videobox/videobox.cpp b/video/videobox/videobox.cpp index 375ac91..5ed0654 100644 --- a/video/videobox/videobox.cpp +++ b/video/videobox/videobox.cpp @@ -133,7 +133,9 @@ void VideoBox::initMenu(QMenu *menu, const QList &enable) void VideoBox::show_video(int type, int index) { //根据不同的父菜单类型执行对应的函数 - if (type == 4) { + if (type == 1) { + change_video_1(index); + } else if (type == 4) { change_video_4(index); } else if (type == 6) { change_video_6(index); diff --git a/video/videopanel/videobox.cpp b/video/videopanel/videobox.cpp index 375ac91..5ed0654 100644 --- a/video/videopanel/videobox.cpp +++ b/video/videopanel/videobox.cpp @@ -133,7 +133,9 @@ void VideoBox::initMenu(QMenu *menu, const QList &enable) void VideoBox::show_video(int type, int index) { //根据不同的父菜单类型执行对应的函数 - if (type == 4) { + if (type == 1) { + change_video_1(index); + } else if (type == 4) { change_video_4(index); } else if (type == 6) { change_video_6(index); diff --git a/widget/screenwidget/frmscreenwidget.cpp b/widget/screenwidget/frmscreenwidget.cpp index c94eee2..900c93c 100644 --- a/widget/screenwidget/frmscreenwidget.cpp +++ b/widget/screenwidget/frmscreenwidget.cpp @@ -10,6 +10,7 @@ frmScreenWidget::frmScreenWidget(QWidget *parent) : QWidget(parent), ui(new Ui:: frmScreenWidget::~frmScreenWidget() { delete ui; + exit(0); } void frmScreenWidget::on_pushButton_clicked() diff --git a/widget/screenwidget/main.cpp b/widget/screenwidget/main.cpp index 3caa5e3..731d494 100644 --- a/widget/screenwidget/main.cpp +++ b/widget/screenwidget/main.cpp @@ -6,6 +6,10 @@ int main(int argc, char *argv[]) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + //设置高分屏缩放舍入策略 + QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor); +#endif QApplication a(argc, argv); a.setFont(QFont("Microsoft Yahei", 9)); diff --git a/widget/screenwidget/screenwidget.cpp b/widget/screenwidget/screenwidget.cpp index 61654a1..104247a 100644 --- a/widget/screenwidget/screenwidget.cpp +++ b/widget/screenwidget/screenwidget.cpp @@ -8,6 +8,7 @@ #include "qevent.h" #include "qdatetime.h" #include "qstringlist.h" +#include "qdebug.h" #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) #include "qscreen.h" @@ -135,7 +136,6 @@ void Screen::cmpPoint(QPoint &leftTop, QPoint &rightDown) if (l.x() <= r.x()) { if (l.y() <= r.y()) { - ; } else { leftTop.setY(r.y()); rightDown.setY(l.y());