更新代码
parent
5c0c9637c4
commit
6eea8cbbee
|
@ -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 {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue