当前位置:网站首页>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步骤).

边栏推荐
- MySQL: MySQL Cluster - Principle and Configuration of Master-Slave Replication
- 常用代码扩展点设计方式
- ThreadLocal comprehensive analysis (1)
- 【开源教程5】疯壳·开源编队无人机-飞控固件烧写
- QT笔记——用VS + qt 生成dll 和 调用生成的dll
- Nodes in the linked list are flipped in groups of k
- DC-7靶场下载及渗透实战详细过程(DC靶场系列)
- 68: Chapter 6: Develop article services: 1: Content sorting; article table introduction; creating [article] article services;
- CFdiv2-Beautiful Mirrors-(期望)
- August 10, 2022: Building Web Applications for Beginners with ASP.NET Core -- Creating Web UIs with ASP.NET Core
猜你喜欢

How to translate financial annual report, why choose a professional translation company?

这款可视化工具神器,更直观易用!太爱了

Regular expression of shell programming and text processor

从斐波那契 - 谈及动态规划 - 优化

瑞幸咖啡第二季营收33亿:门店达7195家 更换CFO

3598. 二叉树遍历(华中科技大学考研机试题)

德科立科创板上市:年营收7.3亿 市值59亿

What is Jmeter? What are the principle steps used by Jmeter?

How many threads does LabVIEW allocate?

H3C S5130 IRF做堆叠
随机推荐
A shell script the for loop statements, while statement
测试4年感觉和1、2年时没什么不同?这和应届生有什么区别?
Common interview questions for APP UI automation testing, maybe useful~
Qualcomm Platform Development Series Explanation (Application) Introduction to QCMAP Application Framework
新一代网络安全防护体系的五个关键特征
RK3399 platform development series explanation (kernel-driven peripherals) 6.35, IAM20680 gyroscope introduction
DC-9靶场下载及渗透实战详细过程(DC靶场系列)
Black cat takes you to learn Makefile Part 11: When the header file a.h changes, how to recompile all the .c files that depend on the header file a.h
音乐播放器(未完成版本)
Shell programming specification and variables
《DevOps围炉夜话》- Pilot - CNCF开源DevOps项目DevStream简介 - feat. PMC成员胡涛
What are the concepts, purposes, processes, and testing methods of interface testing?
pytorch手撕CNN
字节跳动原来这么容易就能进去...
Regular expression of shell programming and text processor
解码2022中国网安强星丨正向建、反向查,华为构建数字化时代的网络安全防线
QT笔记——QT工具uic,rcc,moc,qmake的使用和介绍
Black cat takes you to learn Makefile Part 12: Summary of common Makefile problems
String类的常用方法
Research on multi-element N-k fault model of power system based on AC power flow (implemented by Matlab code) [Power System Fault]