当前位置:网站首页>PyQt5 窗口自适应大小
PyQt5 窗口自适应大小
2022-08-10 22:16:00 【五力】
用pyqt5 Qt Designer设计界面时,希望窗口各控件可以随着鼠标拖动自适应的改变大小。一直没有找到方法,百度搜索了一圈,都说是要设置sizePolicy, 将其Policy改为expanding即可,事实上99%的帖子都是抄来抄着,总是成功不了。
最终看到以下这个视频操作,是可以的,建议大家参考:
PyQT5窗体自动布局 - 西瓜视频 (ixigua.com)https://www.ixigua.com/6842659748869833224?wid_try=1我看这位也有点说多,事实上只在要原先百度上大家抄来抄去的基本上再加上 一步即可,设置好后,选中主窗口的title栏,再应用一次Layout即可自适应了(即下方的1、2、3步骤).
边栏推荐
- Black cats take you learn Makefile article 13: a Makefile collection compile problem
- Self-organization is a two-way journey between managers and members
- ThreadLocal comprehensive analysis (1)
- 2021IDEA创建web工程
- fme csmapreprojector转换器使用高程异常模型进行高程基准转换
- 美味的石井饭
- STL-deque
- 元宇宙社交应用,靠什么吸引用户「为爱发电」?
- 配电网络扩展规划:考虑使用概率性能源生产和消费概况的决策(Matlab代码实现)
- xshell (sed command)
猜你喜欢
【640. 求解方程】
A shell script the for loop statements, while statement
Service - DNS forward and reverse domain name resolution service
fme csmapreprojector转换器使用高程异常模型进行高程基准转换
MySQL: MySQL Cluster - Principle and Configuration of Master-Slave Replication
新一代网络安全防护体系的五个关键特征
DC-8靶场下载及渗透实战详细过程(DC靶场系列)
unusual understanding
链表中的节点每k个一组翻转
ArcGIS中的坐标系统和投影变换
随机推荐
交换机和生成树知识点
这款可视化工具神器,更直观易用!太爱了
Service - DNS forward and reverse domain name resolution service
Shell 编程--Sed
CFdiv2-Common Number-(奇偶数二分+规律)
pytorch tear CNN
服务——DHCP原理与配置
Service - DHCP principle and configuration
Power system power flow calculation (Newton-Raphson method, Gauss-Seidel method, fast decoupling method) (Matlab code implementation)
port forwarding
2021 IDEA creates web projects
【开源教程5】疯壳·开源编队无人机-飞控固件烧写
Conditional Statements of Shell Programming (2)
Addition of linked lists (2)
阿里云贾朝辉:云XR平台支持彼真科技呈现国风科幻虚拟演唱会
美味的佳肴
JS中使用正则表达式g模式和非g模式的区别
德科立科创板上市:年营收7.3亿 市值59亿
file IO-buffer
艺术与科技的狂欢,阿那亚2022砂之盒沉浸艺术季