QT 界面设置边框隐藏,透明

去除对话框的标题栏和边框

在构造函数里设置:

this->setWindowFlags(Qt::FramelessWindowHint);

// 按照对话框的形式创建窗口。

this->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);

//按照正常创酷的形式创建窗口

this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);

2、设置窗口透明

在构造函数内添加:

this->setAttribute(Qt::WA_TranslucentBackground);

 

posted on 2020-08-06 16:09  缘随风烬  阅读(3222)  评论(0编辑  收藏  举报