当前位置:网站首页>[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()
边栏推荐
- Unknown database连接数据库错误
- 【栈】921. Minimum Add to Make Parentheses Valid
- StrictMode分析Registion-StrictMode原理(4)
- 那些一门心思研究自动化测试的人,后来怎样了?
- 微生物检测,土壤微生物的作用有哪些?
- Locking relay ydb-100, 100V
- mysql插入\更新前+判断条件
- TypeError: Argument ‘angle‘ can not be treated as a double
- C语言一点点(未来可会增加)
- Zero of DC learning notes -- overview and basic process introduction
猜你喜欢
Basic knowledge II - Basic definitions related to sta
Basic knowledge 3 - standard unit library
图的连通性基础
dc_ Study and summary of labs--lab1
gin_gorm
[问题已处理]-nvidia-smi命令获取不到自身容器的GPU进程和外部的GPU进程号
DC学习笔记正式篇之零——综述与基本流程介绍
未来的 Web3会带来什么?
Sun Yuchen told Swiss media Bilan that the bear market will not last long
使用 C# 创造 ASCII 艺术
随机推荐
K210 site helmet
06. on several ways of redis persistence
Open3d point cloud bounding box
Microbial safety and health, what is biological treatment?
Strictmode analysis activity leakage -strictmode principle (3)
Installing mongodb database in Windows Environment
Sécurité et santé microbiennes, qu'est - ce que le traitement biologique?
dc_ Study and summary of labs--lab1
Visual studio 2019 shortcut notes
What will Web3 bring in the future?
Complete software development process
What are the functions of soil microorganisms in microbial detection?
Basic knowledge of software and hardware -- diary (1)
3dsmax插件开发遍历节点对象和Object获取及INode变换矩阵说明
[simulation] 922 Sort Array By Parity II
Chromatic judgement bipartite graph
微生物健康,食品微生物检测为什么很重要
流批一体在京东的探索与实践
短视频平台开发,依靠DrawerLayout实现侧滑菜单效果
Open3D 点云包围盒