Giter Site home page Giter Site logo

Comments (11)

wangwenx190 avatar wangwenx190 commented on August 17, 2024 1

I'm currently stuck with Qt5 due to the removal of QtScript. I'll look at the patch, currently working with KDE set of patches

@JulienMaille OK. Here's the link of the upstream fix: https://codereview.qt-project.org/c/qt/qtbase/+/472926. You can cherry-pick it to your own custom build of Qt5.

from framelesshelper.

wangwenx190 avatar wangwenx190 commented on August 17, 2024

感谢反馈,按这个步骤确实能复现。我想一下是哪里的问题。

from framelesshelper.

wangwenx190 avatar wangwenx190 commented on August 17, 2024

目前已经确认是这个函数导致的:

void WinNativeEventFilter::updateQtFrame(QWindow *window, const int titleBarHeight)

但如果不把自定义的窗口边框传给Qt,会导致我们在改变窗口尺寸时,Qt输出一大堆警告信息。

这个问题我也有点摸不着头脑。不过感觉这个问题只是个小问题,虽然确实是个bug,但我觉得应该很少有人会专门去这么操作。

from framelesshelper.

wangwenx190 avatar wangwenx190 commented on August 17, 2024

试了一些老牌的商业控件,发现也有这个问题,看来对于Qt程序而言,这个问题普遍存在。

from framelesshelper.

jaredtao avatar jaredtao commented on August 17, 2024

小问题,影响不大。老牌商业控件 要么没发现,要么发现了也觉得不重要。

from framelesshelper.

wangwenx190 avatar wangwenx190 commented on August 17, 2024

老牌商业控件 要么没发现,要么发现了也觉得不重要。

是,这个问题触发的条件很苛刻,必须严格按照你那个操作来才能触发,一步不对就触发不了。

我觉得这个问题应该是Qt内部没有考虑自定义边框的情况,最大化时记录的窗口几何位置没有减去自定义标题栏的高度导致的。其实你仔细看一下就会发现,被“吃掉”的高度正好等于你自定义标题栏的高度。如果要解决,还是要从Qt内部入手。

from framelesshelper.

wangwenx190 avatar wangwenx190 commented on August 17, 2024

由于是Qt内部问题,因此就不在这个项目的考虑范围内了。我抽空研究下,如果有能力解决的话,就贡献给Qt上游。

from framelesshelper.

wangwenx190 avatar wangwenx190 commented on August 17, 2024

最终发现不是Qt的bug,而是win32窗口普遍存在的问题。没有这个问题的窗口,都是开发者已经自行处理过了。如果使用了Windows默认的逻辑(即调用DefWindowProc),都会存在这个问题。现在已修复。Qt上游也马上会合入相关解决方案,预计6.5.1及之后的版本都会修复。

from framelesshelper.

JulienMaille avatar JulienMaille commented on August 17, 2024

Any hope for a Qt 5.15 patch?

from framelesshelper.

wangwenx190 avatar wangwenx190 commented on August 17, 2024

Any hope for a Qt 5.15 patch?

@JulienMaille Qt 5.15 branch is in a really strict mode so won't accept any modifications unless it's really critical, such as security issue fixes. So this small fix won't be cherry-picked to Qt 5.15 and I've confirmed that with Qt engineers. However, if you can patch Qt yourself, I can give the link of the upstream patch. But I really recommend you upgrade to Qt6, because Qt6 has included so many Windows specific improvements and fixes which 5.15 don't have.

from framelesshelper.

JulienMaille avatar JulienMaille commented on August 17, 2024

I'm currently stuck with Qt5 due to the removal of QtScript. I'll look at the patch, currently working with KDE set of patches

from framelesshelper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.