1.运行界面
![](https://img-blog.csdnimg.cn/20190904101233613.PNG?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3d6ejk1MzIwMDQ2Mw==,size_16,color_FFFFFF,t_70)
2.源码
//.h
#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;
};
#endif // WIDGET_H
//.cpp
#include "widget.h"
#include "ui_widget.h"
#include <QGraphicsDropShadowEffect>
#include <QColor>
const int g_maxValue = 50;
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
ui->setupUi(this);
this->setStyleSheet("background-color: rgb(255, 255, 255);");
ui->frame->setStyle