QT_menu_设置背景透明和去阴影边框
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);