当前位置:网站首页>[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()
边栏推荐
猜你喜欢

Microbiological health, why is food microbiological testing important

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

基础知识之一——STA基础概述

数字IC设计流程总结

"Open math input panel" in MathType editing in win11 is gray and cannot be edited

dc_labs--lab1的学习与总结

Unknown database连接数据库错误

dc_ Study and summary of labs--lab1

uniapp官方组件点击item无效,解决方案

Basic knowledge 3 - standard unit library
随机推荐
Strictmode jamming and leakage detection -strictmode principle (2)
农产品换房?“变相”购房补贴!
DC學習筆記正式篇之零——綜述與基本流程介紹
Poor students can also play raspberry pie
短信在企业中的应用有哪些?
One of the basics - overview of sta Basics
Applet Custom Grid
MFC TCP通信服务端客户端Demo备忘vs2019
User defined annotation implementation verification
Exploration and practice of "flow batch integration" in JD
[leetcode] sum of two numbers [1]
MATLAB 最远点采样(FPS改进版)
Pytorch programming knowledge (2)
Koa koa combine routes sub route management
Open3d point cloud color rendering
06. on several ways of redis persistence
日志 logrus第三方库的使用
使用StrictMode-StrictMode原理(1)
微研所,微生物检验中常用的生化反应
Introduction and principle analysis of cluster and LVS