更新代码

This commit is contained in:
feiyangqingyun
2021-11-22 15:02:04 +08:00
parent 81540be85b
commit 911df2cd6f
5 changed files with 12 additions and 3 deletions

View File

@@ -133,7 +133,9 @@ void VideoBox::initMenu(QMenu *menu, const QList<bool> &enable)
void VideoBox::show_video(int type, int index) 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); change_video_4(index);
} else if (type == 6) { } else if (type == 6) {
change_video_6(index); change_video_6(index);

View File

@@ -133,7 +133,9 @@ void VideoBox::initMenu(QMenu *menu, const QList<bool> &enable)
void VideoBox::show_video(int type, int index) 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); change_video_4(index);
} else if (type == 6) { } else if (type == 6) {
change_video_6(index); change_video_6(index);

View File

@@ -10,6 +10,7 @@ frmScreenWidget::frmScreenWidget(QWidget *parent) : QWidget(parent), ui(new Ui::
frmScreenWidget::~frmScreenWidget() frmScreenWidget::~frmScreenWidget()
{ {
delete ui; delete ui;
exit(0);
} }
void frmScreenWidget::on_pushButton_clicked() void frmScreenWidget::on_pushButton_clicked()

View File

@@ -6,6 +6,10 @@
int main(int argc, char *argv[]) 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); QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9)); a.setFont(QFont("Microsoft Yahei", 9));

View File

@@ -8,6 +8,7 @@
#include "qevent.h" #include "qevent.h"
#include "qdatetime.h" #include "qdatetime.h"
#include "qstringlist.h" #include "qstringlist.h"
#include "qdebug.h"
#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
#include "qscreen.h" #include "qscreen.h"
@@ -135,7 +136,6 @@ void Screen::cmpPoint(QPoint &leftTop, QPoint &rightDown)
if (l.x() <= r.x()) { if (l.x() <= r.x()) {
if (l.y() <= r.y()) { if (l.y() <= r.y()) {
;
} else { } else {
leftTop.setY(r.y()); leftTop.setY(r.y());
rightDown.setY(l.y()); rightDown.setY(l.y());