#include "testfenbianlv.h"
#include <QTextEdit>
#include <QDebug>
#include <QScrollBar>
#include <QFontMetrics>
#pragma execution_character_set("utf-8")
TestFenBianLv::TestFenBianLv(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
this->setAttribute(Qt::WA_TranslucentBackground, true);
setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);//|Qt::WindowSystemMenuHint);
}
TestFenBianLv::~TestFenBianLv()
{
}
void TestFenBianLv::paintEvent(QPaintEvent *event)
{
if (isMaximized())
{
return;
}
int nShadowsWidth = 10;
int nRadius = 6;
QPainterPath path;
path.setFillRule(Qt::WindingFill);
path.addRoundedRect(nShadowsWidth, nShadowsWidth, this->width() - nShadowsWidth * 2, this->height() - nShadowsWidth * 2, nRadius, nRadius);
QPainter painter(this);
QColor color(0, 0, 0, 200);
for (int i = 0; i < nShadowsWidth; i++)
{
QPainterPath path;
path.setFillRule(Qt::WindingFill);
path.addRoundedRect(nShadowsWidth - i, nShadowsWidth - i, this->width() - (nShadowsWidth - i) * 2, this->height() - (nShadowsWidth - i) * 2, nRadius + i, nRadius + i);
color.setAlpha(120 - qSqrt(i) * 45);
painter.setPen(color);
painter.drawPath(path);
}
}
sxywu520
- 粉丝: 10
- 资源: 24
最新资源
- 基于Java的奖励养成类蓝牙联机游戏.zip
- 基于Java+Swing的石头剪刀布游戏.zip
- Java作战小游戏.zip学习资料程序大作业
- Easyx的小游戏,飞翔的小鸟
- Tetris GUI game based on Java language development(基于Java语言开发的俄罗斯方块GUI小游戏 ).zip
- html常规学习.zip资源资料用户手册
- Semester Examination Works. 烟台科技学院,智能工程学院,Java编程基础课设 Java打字游戏.zip
- PingFang SC、HK、TC(Win 完美协作-修改版).apk
- 64edf716dbff6a93a2ca0b5636e312da1722606914910.jpg.jpg
- mmexport1726895720568.jpg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
前往页