您的位置:首页 > 编程语言 > Qt开发

QT_menu_设置背景透明和去阴影边框

2017-05-23 15:30 549 查看
r_menu->setWindowFlags(r_menu->windowFlags() | Qt::FramelessWindowHint);
r_menu->setAttribute(Qt::WA_TranslucentBackground);

HWND hwnd = reinterpret_cast<HWND>(r_menu->winId());
DWORD class_style = ::GetClassLong(hwnd, GCL_STYLE);
class_style &= ~CS_DROPSHADOW;
::SetClassLong(hwnd, GCL_STYLE, class_style);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: