更新代码
This commit is contained in:
BIN
other/0snap/multobj2slot.jpg
Normal file
BIN
other/0snap/multobj2slot.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 141 KiB |
@@ -12,7 +12,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
31
other/multobj2slot/main.cpp
Normal file
31
other/multobj2slot/main.cpp
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
|
#include "widget.h"
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QTextCodec>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
QApplication a(argc, argv);
|
||||||
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
|
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
||||||
|
#if _MSC_VER
|
||||||
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
|
#else
|
||||||
|
QTextCodec *codec = QTextCodec::codecForName("utf-8");
|
||||||
|
#endif
|
||||||
|
QTextCodec::setCodecForLocale(codec);
|
||||||
|
QTextCodec::setCodecForCStrings(codec);
|
||||||
|
QTextCodec::setCodecForTr(codec);
|
||||||
|
#else
|
||||||
|
QTextCodec *codec = QTextCodec::codecForName("utf-8");
|
||||||
|
QTextCodec::setCodecForLocale(codec);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Widget w;
|
||||||
|
w.setWindowTitle("多对象共用槽 (QQ: 517216493 WX: feiyangqingyun)");
|
||||||
|
w.show();
|
||||||
|
|
||||||
|
return a.exec();
|
||||||
|
}
|
||||||
13
other/multobj2slot/multobj2slot.pro
Normal file
13
other/multobj2slot/multobj2slot.pro
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
QT += core gui
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
|
||||||
|
|
||||||
|
TARGET = mouseline
|
||||||
|
TEMPLATE = app
|
||||||
|
DESTDIR = $$PWD/../bin
|
||||||
|
CONFIG += warn_off
|
||||||
|
|
||||||
|
SOURCES += main.cpp
|
||||||
|
SOURCES += widget.cpp
|
||||||
|
HEADERS += widget.h
|
||||||
|
FORMS += widget.ui
|
||||||
70
other/multobj2slot/widget.cpp
Normal file
70
other/multobj2slot/widget.cpp
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
#include "widget.h"
|
||||||
|
#include "ui_widget.h"
|
||||||
|
#include "qpushbutton.h"
|
||||||
|
#include "qsignalmapper.h"
|
||||||
|
#include "qdatetime.h"
|
||||||
|
#include "qdebug.h"
|
||||||
|
|
||||||
|
#define TIMEMS QTime::currentTime().toString("hh:mm:ss zzz")
|
||||||
|
Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
this->initBtn();
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget::~Widget()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Widget::initBtn()
|
||||||
|
{
|
||||||
|
QSignalMapper *signMap = new QSignalMapper(this);
|
||||||
|
connect(signMap, SIGNAL(mapped(QString)), this, SLOT(doBtn(QString)));
|
||||||
|
|
||||||
|
int x = 5, y = -25;
|
||||||
|
for (int i = 0; i < 1000; ++i) {
|
||||||
|
//动态设置坐标
|
||||||
|
x += 80;
|
||||||
|
if (i % 10 == 0) {
|
||||||
|
x = 5;
|
||||||
|
y += 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton *btn = new QPushButton(this);
|
||||||
|
btn->setObjectName(QString("btn_%1").arg(i + 1));
|
||||||
|
btn->setText(QString("text_%1").arg(i + 1));
|
||||||
|
btn->setGeometry(x, y, 75, 25);
|
||||||
|
|
||||||
|
//方法0: 每个按钮关联到一个独立的槽,代码量大不可取放弃
|
||||||
|
//方式1: 绑定到一个槽函数
|
||||||
|
connect(btn, SIGNAL(clicked(bool)), this, SLOT(doBtn()));
|
||||||
|
//方式2: 通过 QSignalMapper 转发信号
|
||||||
|
connect(btn, SIGNAL(clicked(bool)), signMap, SLOT(map()));
|
||||||
|
signMap->setMapping(btn, btn->objectName());
|
||||||
|
//方法3: 用 lambda 表达式
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5,6,0))
|
||||||
|
connect(btn, &QPushButton::clicked, [btn] {
|
||||||
|
QString name = btn->objectName();
|
||||||
|
qDebug() << TIMEMS << "doBtn3" << name;
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(btn, &QPushButton::clicked, [=]() {
|
||||||
|
QString name = btn->objectName();
|
||||||
|
qDebug() << TIMEMS << "doBtn3" << name;
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Widget::doBtn()
|
||||||
|
{
|
||||||
|
QPushButton *btn = (QPushButton *)sender();
|
||||||
|
QString name = btn->objectName();
|
||||||
|
qDebug() << TIMEMS << "doBtn1" << name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Widget::doBtn(const QString &name)
|
||||||
|
{
|
||||||
|
qDebug() << TIMEMS << "doBtn2" << name;
|
||||||
|
}
|
||||||
27
other/multobj2slot/widget.h
Normal file
27
other/multobj2slot/widget.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef WIDGET_H
|
||||||
|
#define WIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Widget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Widget(QWidget *parent = 0);
|
||||||
|
~Widget();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::Widget *ui;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void initBtn();
|
||||||
|
void doBtn();
|
||||||
|
void doBtn(const QString &name);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WIDGET_H
|
||||||
20
other/multobj2slot/widget.ui
Normal file
20
other/multobj2slot/widget.ui
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Widget</class>
|
||||||
|
<widget class="QWidget" name="Widget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>600</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@@ -6,3 +6,4 @@ SUBDIRS += mouseline
|
|||||||
SUBDIRS += ntpclient
|
SUBDIRS += ntpclient
|
||||||
SUBDIRS += trayicon
|
SUBDIRS += trayicon
|
||||||
SUBDIRS += echartgauge
|
SUBDIRS += echartgauge
|
||||||
|
SUBDIRS += multobj2slot
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
|
|||||||
QDesigner app(argc, argv);
|
QDesigner app(argc, argv);
|
||||||
app.setQuitOnLastWindowClosed(false);
|
app.setQuitOnLastWindowClosed(false);
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
按照国际惯例,先吹吹牛,QCustomPlot这个开源图表组件,作者绝对是全宇宙Qt领域的天花板,设计的极其巧妙和精美,各种情况都考虑到了,将每个功能细分到不同的类,又极具拓展性,当时阅读完代码的时候,我直接跪了8个小时,膝盖现在还是红的。
|
按照国际惯例,先吹吹牛,QCustomPlot这个开源图表组件,作者绝对是全宇宙Qt领域的天花板,设计的极其巧妙和精美,各种情况都考虑到了,将每个功能细分到不同的类,每个类负责管理自己的绘制和各种属性参数等,虽然代码量不多但是又极具拓展性,当时阅读完代码的时候,我直接跪了8个小时,膝盖现在还是红的。作者的实力至少是八星斗圣级别,只要一个巴掌就能把斗宗干趴下。
|
||||||
## 一、功能特点
|
## 一、功能特点
|
||||||
1. 同时支持多个版本,比如1.3、2.0、2.1。
|
1. 同时支持多个版本,比如1.3、2.0、2.1。
|
||||||
2. 官方提供的最新的2.1不支持Qt4,也不支持Qt6.2,所以这里通过define判断Qt套件的版本来加载不同的版本。
|
2. 官方提供的最新的2.1不支持Qt4,也不支持Qt6.2,所以这里通过define判断Qt套件的版本来加载不同的版本。
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ greaterThan(QT_MAJOR_VERSION, 5) {
|
|||||||
SUBDIRS -= hotkey
|
SUBDIRS -= hotkey
|
||||||
SUBDIRS -= shortcut
|
SUBDIRS -= shortcut
|
||||||
SUBDIRS -= qwtdemo
|
SUBDIRS -= qwtdemo
|
||||||
SUBDIRS -= qcustomplotdemo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setWindowIcon(QIcon(":/main.ico"));
|
a.setWindowIcon(QIcon(":/main.ico"));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ QString FlatUI::setProgressQss(QProgressBar *bar, int barHeight,
|
|||||||
{
|
{
|
||||||
|
|
||||||
QStringList list;
|
QStringList list;
|
||||||
list.append(QString("QProgressBar{font:%1pt;background:%2;max-height:%3px;border-radius:%4px;text-align:center;border:1px solid %2;}")
|
list.append(QString("QProgressBar{font:%1px;background:%2;max-height:%3px;border-radius:%4px;text-align:center;border:1px solid %2;}")
|
||||||
.arg(fontSize).arg(normalColor).arg(barHeight).arg(barRadius));
|
.arg(fontSize).arg(normalColor).arg(barHeight).arg(barRadius));
|
||||||
list.append(QString("QProgressBar:chunk{border-radius:%2px;background-color:%1;}")
|
list.append(QString("QProgressBar:chunk{border-radius:%2px;background-color:%1;}")
|
||||||
.arg(chunkColor).arg(barRadius));
|
.arg(chunkColor).arg(barRadius));
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
static QString setProgressQss(QProgressBar *bar,
|
static QString setProgressQss(QProgressBar *bar,
|
||||||
int barHeight = 8, //进度条高度
|
int barHeight = 8, //进度条高度
|
||||||
int barRadius = 5, //进度条半径
|
int barRadius = 5, //进度条半径
|
||||||
int fontSize = 9, //文字字号
|
int fontSize = 12, //文字字号
|
||||||
const QString &normalColor = "#E8EDF2", //正常颜色
|
const QString &normalColor = "#E8EDF2", //正常颜色
|
||||||
const QString &chunkColor = "#E74C3C"); //进度颜色
|
const QString &chunkColor = "#E74C3C"); //进度颜色
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ void frmMain::initForm()
|
|||||||
|
|
||||||
int rowHeight = 23;
|
int rowHeight = 23;
|
||||||
ui->tableWidget->horizontalHeader()->setFixedHeight(rowHeight);
|
ui->tableWidget->horizontalHeader()->setFixedHeight(rowHeight);
|
||||||
for (int i = 0; i < 5; ++i) {
|
ui->tableWidget->verticalHeader()->setDefaultSectionSize(rowHeight);
|
||||||
ui->tableWidget->setRowHeight(i, rowHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
//加载鼠标右键菜单翻译文件
|
//加载鼠标右键菜单翻译文件
|
||||||
QTranslator *translator1 = new QTranslator(qApp);
|
QTranslator *translator1 = new QTranslator(qApp);
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>817</width>
|
<width>820</width>
|
||||||
<height>616</height>
|
<height>632</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -310,7 +310,7 @@
|
|||||||
<item row="3" column="2">
|
<item row="3" column="2">
|
||||||
<widget class="QPushButton" name="btnWidget">
|
<widget class="QPushButton" name="btnWidget">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>弹出新窗体</string>
|
<string>新窗体</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -427,7 +427,7 @@
|
|||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'SimSun'; font-size:9.07563pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9.07563pt;"><br /></p></body></html></string>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9.07563pt;"><br /></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -545,9 +545,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTableWidget" name="tableWidget">
|
<widget class="QTableWidget" name="tableWidget">
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
@@ -563,9 +560,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
<attribute name="verticalHeaderHighlightSections">
|
<attribute name="verticalHeaderHighlightSections">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="verticalHeaderStretchLastSection">
|
|
||||||
<bool>true</bool>
|
|
||||||
</attribute>
|
|
||||||
<row>
|
<row>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
@@ -765,7 +759,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>817</width>
|
<width>820</width>
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -892,12 +886,28 @@ p, li { white-space: pre-wrap; }
|
|||||||
<slot>setValue(int)</slot>
|
<slot>setValue(int)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>369</x>
|
<x>424</x>
|
||||||
<y>235</y>
|
<y>265</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>468</x>
|
<x>547</x>
|
||||||
<y>235</y>
|
<y>260</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>verticalSlider</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>progressBar2</receiver>
|
||||||
|
<slot>setValue(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>736</x>
|
||||||
|
<y>101</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>760</x>
|
||||||
|
<y>115</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
|||||||
@@ -5,9 +5,13 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
//设置不应用操作系统设置比如字体
|
//设置不应用操作系统设置比如字体
|
||||||
QApplication::setDesktopSettingsAware(false);
|
QApplication::setDesktopSettingsAware(false);
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
|
||||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor);
|
QApplication::setAttribute(Qt::AA_Use96Dpi);
|
||||||
#endif
|
#endif
|
||||||
|
#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));
|
||||||
QFont font;
|
QFont font;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ int main(int argc, char *argv[])
|
|||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setFont(QFont("Microsoft Yahei", 9));
|
a.setFont(QFont("Microsoft Yahei", 9));
|
||||||
|
|
||||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user