更新代码
parent
5c0c9637c4
commit
6eea8cbbee
|
@ -17,7 +17,6 @@ greaterThan(QT_MAJOR_VERSION, 5) {
|
|||
SUBDIRS -= hotkey
|
||||
SUBDIRS -= shortcut
|
||||
SUBDIRS -= qwtdemo
|
||||
SUBDIRS -= qcustomplotdemo
|
||||
}
|
||||
|
||||
win32 {
|
||||
|
|
|
@ -53,7 +53,7 @@ QString FlatUI::setProgressQss(QProgressBar *bar, int barHeight,
|
|||
{
|
||||
|
||||
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));
|
||||
list.append(QString("QProgressBar:chunk{border-radius:%2px;background-color:%1;}")
|
||||
.arg(chunkColor).arg(barRadius));
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
static QString setProgressQss(QProgressBar *bar,
|
||||
int barHeight = 8, //进度条高度
|
||||
int barRadius = 5, //进度条半径
|
||||
int fontSize = 9, //文字字号
|
||||
int fontSize = 12, //文字字号
|
||||
const QString &normalColor = "#E8EDF2", //正常颜色
|
||||
const QString &chunkColor = "#E74C3C"); //进度颜色
|
||||
|
||||
|
|
|
@ -24,9 +24,7 @@ void frmMain::initForm()
|
|||
|
||||
int rowHeight = 23;
|
||||
ui->tableWidget->horizontalHeader()->setFixedHeight(rowHeight);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
ui->tableWidget->setRowHeight(i, rowHeight);
|
||||
}
|
||||
ui->tableWidget->verticalHeader()->setDefaultSectionSize(rowHeight);
|
||||
|
||||
//加载鼠标右键菜单翻译文件
|
||||
QTranslator *translator1 = new QTranslator(qApp);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>817</width>
|
||||
<height>616</height>
|
||||
<width>820</width>
|
||||
<height>632</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -310,7 +310,7 @@
|
|||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="btnWidget">
|
||||
<property name="text">
|
||||
<string>弹出新窗体</string>
|
||||
<string>新窗体</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -427,7 +427,7 @@
|
|||
<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">
|
||||
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>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -545,9 +545,6 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<number>20</number>
|
||||
</attribute>
|
||||
|
@ -563,9 +560,6 @@ p, li { white-space: pre-wrap; }
|
|||
<attribute name="verticalHeaderHighlightSections">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<row>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
|
@ -765,7 +759,7 @@ p, li { white-space: pre-wrap; }
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>817</width>
|
||||
<width>820</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -892,12 +886,28 @@ p, li { white-space: pre-wrap; }
|
|||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>369</x>
|
||||
<y>235</y>
|
||||
<x>424</x>
|
||||
<y>265</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>468</x>
|
||||
<y>235</y>
|
||||
<x>547</x>
|
||||
<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>
|
||||
</hints>
|
||||
</connection>
|
||||
|
|
|
@ -5,9 +5,13 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
//设置不应用操作系统设置比如字体
|
||||
QApplication::setDesktopSettingsAware(false);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
|
||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Floor);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
|
||||
QApplication::setAttribute(Qt::AA_Use96Dpi);
|
||||
#endif
|
||||
#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));
|
||||
QFont font;
|
||||
|
|
Loading…
Reference in New Issue