当前位置:网站首页>【Qt5-基础篇_1】从0开始,德天老师和你一起学习——窗口简介
【Qt5-基础篇_1】从0开始,德天老师和你一起学习——窗口简介
2022-07-01 00:41:00 【德天老师】
窗口创建
理清基本逻辑,对内容进行进一步的分层解理,对代码片断进行合理的切割,不断的切割代码,才能更好的体会代码内涵。
创建初始数据
initUi(self)—
2.1—窗口标题
2.2—窗口图标
2.3—窗口大小窗口运行
from PyQt5 import QtGui, QtCore
from PyQt5.Qt import *
import sys
class Window(QWidget):
def __init__(self):
super().__init__()
self.title = 'PyQt5 Frameless Window'
self.left = 500
self.top = 200
self.width = 300
self.height = 250
self.iconName='home.png'
self.initUi()
def initUi(self):
self.setWindowTitle(self.title) #标题
self.setWindowIcon(QtGui.QIcon(self.iconName)) #图标
self.setGeometry(self.left,self.top,self.width,self.height) # 尺寸
self.show() #显示
if __name__ =='__main__':
app = QApplication([])
win = Window()
# win.show()
边栏推荐
- 人穷志不短,穷学生也能玩转树莓派
- [go] go implements row column conversion of sets
- Dls-20 double position relay 220VDC
- Golang treasure house recommendation
- [learning notes] structure
- Pre training / transfer learning of models
- Mustache syntax
- None of the following candidates is applicable because of a receiver type mismatch
- [learning notes] simple DP
- 系统设置大页
猜你喜欢

酒旅板块复苏,亚朵继续上市梦,距离“新住宿经济第一股“还有多远?

Openmv and k210 of the f question of the 2021 video game call the openmv API for line patrol, which is completely open source.

Docker deployment MySQL 8
![分割链表[先取next再斩断链表防止断链]](/img/eb/708ab20c13df75f4dbd2d6461d3602.png)
分割链表[先取next再斩断链表防止断链]

Practical shell knowledge

个人博客搭建与美化

二十多年来第一次!CVPR最佳学生论文授予中国高校学生!
![[go] go implements row column conversion of sets](/img/d9/6272e55b2d9c6b6fbdf2537773bb83.png)
[go] go implements row column conversion of sets

图的连通性基础

Metauniverse and virtual reality (II)
随机推荐
基础知识之二——STA相关的基本定义
Call the classic architecture and build the model based on the classic
StrictMode带来的思考-StrictMode原理(5)
Openmv and k210 of the f question of the 2021 video game call the openmv API for line patrol, which is completely open source.
About the general input operation mode of unity
Day31-t1380-2022-02-15-not answer by yourself
基础知识之一——STA基础概述
冲击继电器ZC-23/DC220V
Koa koa combine routes sub route management
visual studio 2019 快捷键备忘
[learning notes] simple DP
Analyze the maker education path integrating the essence of discipline
ESP8266 RC522
K210门禁毕设
个人博客搭建与美化
The longest selling mobile phone in China has been selling well since its launch, crushing iphone12
MFC TCP communication server client demo notes vs2019
DX-11Q信号继电器
文件服务设计
Q play soft large toast to bring more comfortable sleep