直接设置子窗体的两个属性即可 setWindowFlag(Qt::FramelessWindowHint, true); setAttribute(Qt::WA_TranslucentBackground, true);