可调整大小的无边框窗口

huangapple go评论86阅读模式
英文:

Resizable frameless Window

问题

我有一个无边框的Qt窗口。我正在使用自定义按钮来还原或最大化窗口。我希望用户在窗口还原时能够调整窗口大小。为了实现这个目标,我参考了以下帖子中的答案:

https://stackoverflow.com/questions/43505580/qt-windows-resizable-frameless-window

现在我面临的问题是,当我尝试在还原状态下调整窗口大小时,窗口的调整大小手柄没有出现。

英文:

I have a frameless Qt Window. I am using custom buttons to restore down or maximize the window. I want the user to be able to resize the window when the window is restored down. To achieve that, I referred to the answer in the following post:

https://stackoverflow.com/questions/43505580/qt-windows-resizable-frameless-window

Now the problem I'm facing is that the window resize handles are not appearing when I try to resize the window in restore down state.

答案1

得分: -1

我在这个帖子中找到了我的答案。

https://stackoverflow.com/questions/7139559/how-to-implement-qsizegrip-in-a-qt-frameless-window

当我恢复窗口大小和最大化窗口时,我添加了并移除了QSizeGrip小部件。

英文:

Found my answer in this post.

https://stackoverflow.com/questions/7139559/how-to-implement-qsizegrip-in-a-qt-frameless-window

I added & removed the QSizeGrip widget when Restoring down & maximizing my window.

huangapple
  • 本文由 发表于 2023年7月20日 18:02:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/76728759.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定