Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 7系统启动并关闭模态窗口QDialog后崩溃 #110

Open
KarvinZheng opened this issue Jul 6, 2024 · 2 comments
Open

Windows 7系统启动并关闭模态窗口QDialog后崩溃 #110

KarvinZheng opened this issue Jul 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@KarvinZheng
Copy link

KarvinZheng commented Jul 6, 2024

    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正常

@KarvinZheng
Copy link
Author

目前我改以下代码可以临时解决崩溃的问题:
void Win32WindowContext::winIdChanged(WId winId, WId oldWinId) {
。。。
if (!isSystemBorderEnabled() && isWin8OrGreater()) {
m_delegate->setWindowFlags(m_host, m_delegate->getWindowFlags(m_host) |
Qt::FramelessWindowHint);
}
。。。
}

@SineStriker
Copy link
Contributor

需要研究一下。

@SineStriker SineStriker added the bug Something isn't working label Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants