zhiyiYo / PyQt-Frameless-Window

A cross-platform frameless window based on pyqt5, support Win32, Linux and macOS.
https://pyqt-frameless-window.readthedocs.io
GNU General Public License v3.0
482 stars 67 forks source link

窗口缩放时,如何限制窗口的最小宽度,防止titleBar过度压缩 #122

Closed gamesun closed 1 year ago

gamesun commented 1 year ago

Is your feature request related to a problem? Please describe. 窗口缩放时,如何限制窗口的最小宽度,以防止titleBar的控件重叠或显示不全

Describe the solution you'd like 限制窗口的最小宽度?

Describe alternatives you've considered 我试了改变titleBar的sizePolicy, 给每个控件设置setMinimumSize,setFixedSize,没能成功 或者self.titleBar.hBoxLayout.setSizeConstraint(QLayout.SetFixedSize),只是titleBar不缩放了,但会被cut 可能我的方向不对?请指点一下,谢谢

Additional context 以您的examples\demo.py为例,横向缩放到最窄时,titleBar被压缩过度了 2

zhiyiYo commented 1 year ago

给主界面setMinimumWidth

gamesun commented 1 year ago

给主界面setMinimumWidth

谢谢 如果标题栏有个控件的宽度是动态变化的,有什么event,可以自动更新这个MinimunWidth

zhiyiYo commented 1 year ago

安个事件过滤器