qwindowkit
qwindowkit copied to clipboard
Windows 7系统启动并关闭模态窗口QDialog后崩溃
auto dwmBlurAction = new QAction(tr("Enable DWM blur"), menuBar);
dwmBlurAction->setCheckable(true);
connect(dwmBlurAction, &QAction::toggled, this, [this](bool checked) {
QDialog dlg(this);
auto agent = new QWK::WidgetWindowAgent(&dlg);
agent->setup(&dlg);
dlg.exec();
return;
if (!windowAgent->setWindowAttribute(QStringLiteral("dwm-blur"), checked)) {
return;
}
setProperty("custom-style", checked);
style()->polish(this);
});
Qt:5.15.9 操作系统:Windows 7 PS:Windows 10 & Windows 11 正常,Frameless-Helper正常
目前我改以下代码可以临时解决崩溃的问题: void Win32WindowContext::winIdChanged(WId winId, WId oldWinId) { 。。。 if (!isSystemBorderEnabled() && isWin8OrGreater()) { m_delegate->setWindowFlags(m_host, m_delegate->getWindowFlags(m_host) | Qt::FramelessWindowHint); } 。。。 }
需要研究一下。