更新代码
This commit is contained in:
@@ -10,6 +10,7 @@ frmScreenWidget::frmScreenWidget(QWidget *parent) : QWidget(parent), ui(new Ui::
|
||||
frmScreenWidget::~frmScreenWidget()
|
||||
{
|
||||
delete ui;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void frmScreenWidget::on_pushButton_clicked()
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user