資源簡介
Qt動態圓形進度條。
這個系非常非常漂亮滴。歡迎大家可以學習。

代碼片段和文件信息
#include?“frmroundplot.h“
#include?“ui_frmroundplot.h“
frmRoundPlot::frmRoundPlot(QWidget?*parent)?:
????QWidget(parent)
????ui(new?Ui::frmRoundPlot)
{
????ui->setupUi(this);
????this->initForm();
????on_pushButton_clicked();
}
frmRoundPlot::~frmRoundPlot()
{
????delete?ui;
}
void?frmRoundPlot::initForm()
{
????ui->widget2->setUsedColor(QColor(41?137?219));
????ui->widget2->setFreeColor(QColor(50?50?50));
????ui->widget2->setRangeTextColor(QColor(103?103?103));
????ui->widget2->setValueTextColor(QColor(250?250?250));
????ui->widget2->setValueBgColor(QColor(45?169?222));
????ui->widget2->setOutBgColor(QColor(202?225?255));
????ui->widget2->setCenterBgColor(QColor(67?205?128)?QColor(60?179?113));
}
void?frmRoundPlot::on_pushButton_clicked()
{
????QString?unit?=?ui->txtUnit->text();
????double?minValue?=?ui->txtMinValue->text().toDouble();
????double?maxValue?=?ui->txtMaxValue->text().toDouble();
????double?value?=?ui->txtValue->text().toDouble();
????ui->widget1->setUnit(unit);
????ui->widget1->setRange(minValue?maxValue);
????ui->widget1->setValue(value);
????ui->widget2->setUnit(unit);
????ui->widget2->setRange(minValue?maxValue);
????ui->widget2->setValue(value);
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-12-27?20:22??RoundPlot\
?????文件????????1255??2016-10-29?18:38??RoundPlot\frmroundplot.cpp
?????文件?????????396??2016-10-16?14:18??RoundPlot\frmroundplot.h
?????文件????????3102??2016-10-15?14:32??RoundPlot\frmroundplot.ui
?????文件?????????187??2016-10-29?18:29??RoundPlot\main.cpp
?????文件????????6767??2016-10-29?18:41??RoundPlot\roundplot.cpp
?????文件????????3150??2016-10-22?21:07??RoundPlot\roundplot.h
?????文件?????????428??2016-10-29?18:29??RoundPlot\RoundPlot.pro
?????文件???????23908??2017-12-27?20:22??RoundPlot\RoundPlot.pro.user
評論
共有 條評論