当前位置:网站首页>[Qt5 basic \u 1] starting from 0, Mr. Detian will study with you - Introduction to the window
[Qt5 basic \u 1] starting from 0, Mr. Detian will study with you - Introduction to the window
2022-07-01 01:32:00 【Teacher Detian】
Window creation
Clarify basic logic , Further hierarchical decomposition of content , Cut code fragments reasonably , Constantly cutting code , To better understand the meaning of the code .
Create initial data
initUi(self)—
2.1— Window title
2.2— Window icons
2.3— Window sizeWindow run
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) # title
self.setWindowIcon(QtGui.QIcon(self.iconName)) # Icon
self.setGeometry(self.left,self.top,self.width,self.height) # Size
self.show() # Show
if __name__ =='__main__':
app = QApplication([])
win = Window()
# win.show()
边栏推荐
- Relationship between ASCII, Unicode, GBK, UTF-8
- Unknown database连接数据库错误
- TypeError: can‘t convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to
- zabbix如何配置告警短信?(预警短信通知设置流程)
- StrictMode卡顿与泄漏检测-StrictMode原理(2)
- 【动态规划】路径dp:931. Minimum Falling Path Sum
- 微生物安全與健康,什麼是生物處理?
- 生意和投资的思考
- MFC TCP communication server client demo notes vs2019
- Looksrare team's "cash out" caused disturbance
猜你喜欢

Zero of DC learning notes -- overview and basic process introduction

3dsmax插件开发遍历节点对象和Object获取及INode变换矩阵说明

Institute of Microbiology, commonly used biochemical reactions in microbiological testing

K210 site helmet

Uniapp official component clicking item is invalid, solution

WIN11中MathType编辑中“打开数学输入面板”是灰色不可编辑

医疗HIS行业短信发送解决方案

Install redis database and download redis Desktop Manager in win11

ESP8266 RC522
![[problem handled] -nvidia SMI command cannot obtain the GPU process number of its own container and the external GPU process number](/img/51/e48e222c14f4a4e9f2be91a677033f.png)
[problem handled] -nvidia SMI command cannot obtain the GPU process number of its own container and the external GPU process number
随机推荐
mysql插入\更新前+判断条件
Open3D 点云包围盒
基础知识之二——STA相关的基本定义
微研所,微生物检验中常用的生化反应
About the general input operation mode of unity
Q play soft large toast to bring more comfortable sleep
Service grid ASM year end summary: how do end users use the service grid?
User defined annotation implementation verification
Relationship between ASCII, Unicode, GBK, UTF-8
【office办公-pdf篇】pdf合并与拆分让我们摆脱付费软件的功能限制好不好
visual studio 2019 下载
Two position relay st2-2l/ac220v
Strictmode analysis registration strictmode principle (4)
[问题已处理]-nvidia-smi命令获取不到自身容器的GPU进程和外部的GPU进程号
One of the basics - overview of sta Basics
Impact relay zc-23/dc220v
为什么要搭建个人博客
"Open math input panel" in MathType editing in win11 is gray and cannot be edited
【qt5-tab标签精讲】Tab标签及内容分层解析
直播商城源码,实现左右联动商品分类页面