1 Star 0 Fork 2

沉默至今/GoSlowDetection

forked from jiangtao/GoSlowDetection 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
overviewwindow.h 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
jiangtao 提交于 2022-02-28 15:48 . 实现曲线ui的实现及其美化
#ifndef OVERVIEWWINDOW_H
#define OVERVIEWWINDOW_H
#include <QFrame>
#include <QDateTime>
#include <QTimer>
#include <QString>
#include <QPainter>
namespace Ui {
class OverviewWindow;
}
class OverviewWindow : public QFrame
{
Q_OBJECT
public:
explicit OverviewWindow(QDateTime time, QWidget *parent = nullptr);
~OverviewWindow();
signals:
void closeThis();
protected:
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void paintEvent(QPaintEvent *event)
{
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
painter.setBrush(QBrush(QColor(75, 75, 75)));
painter.setPen(Qt::transparent);
QRect rect = this->rect();
rect.setWidth(rect.width() - 1);
rect.setHeight(rect.height() - 1);
painter.drawRoundedRect(rect, 8, 8);
QWidget::paintEvent(event);
}
private slots:
void on_pushButton_close_clicked();
private:
Ui::OverviewWindow *ui;
QDateTime startRunTime;
QTimer mTime;
bool isPress;
QPoint pressPos;
};
#endif // OVERVIEWWINDOW_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/cmzj/GoSlowDetection.git
git@gitee.com:cmzj/GoSlowDetection.git
cmzj
GoSlowDetection
GoSlowDetection
master

搜索帮助