去除对话框的标题栏和边框
在构造函数里设置:
this->setWindowFlags(Qt::FramelessWindowHint);
// 按照对话框的形式创建窗口。
this->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
//按照正常创酷的形式创建窗口
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
2、设置窗口透明
在构造函数内添加:
this->setAttribute(Qt::WA_TranslucentBackground);