运行环境:framebuffer、armlinux系统、qt5.4
设置这两句
setAttribute(Qt::WA_TranslucentBackground);
setWindowFlags(Qt::FramelessWindowHint);
//通过这个接口可以发现
void MissionMark::PrintWindowFlags()
{
QString text;
Qt::WindowFlags flags = this->windowFlags();
Qt::WindowFlags type = ( flags & Qt::WindowType_Mask);
if (type == Qt::Window) {
text = "Qt::Window";
} else if (type == Qt::Dialog) {
text = "Qt::Dialog";
} else if (type == Qt::Widget) {
text = "Qt::Widget";
} else if (type == Qt::ForeignWindow) {
text = "Qt::ForeignWindow";
} else if (type == Qt::SubWindow) {
text = "Qt::SubWindow";
} else if (type == Qt::CoverWindow) {
text = "Qt::CoverWindow";
} else if (type == Qt::Desktop) {
text = "Qt::Desktop";