当前位置:网站首页>[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()
边栏推荐
- Poor students can also play raspberry pie
- 用 Flutter 的 Canvas 画点有趣的图形
- [deepin] common sets
- 物业怎么发短信通知给业主?
- [leetcode] sum of two numbers [1]
- The liquor and tourism sector recovers, and Yaduo continues to dream of listing. How far is it from "the first share of the new accommodation economy"?
- User defined annotation implementation verification
- Exploration and practice of "flow batch integration" in JD
- Typora的使用
- [problem handled] -nvidia SMI command cannot obtain the GPU process number of its own container and the external GPU process number
猜你喜欢

Construction and beautification of personal blog

Unknown database连接数据库错误

Installing mongodb database in Windows Environment

qt5-MVC:数据可视化的层次揭秘
![[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

Looksrare team's "cash out" caused disturbance

Introduction and principle analysis of cluster and LVS

flutter报错 -- The argument type ‘Function‘ can‘t be assigned to the parameter type ‘void Function()?‘

Dx-11q signal relay

What will Web3 bring in the future?
随机推荐
C# 自定义并动态切换光标
Call the classic architecture and build the model based on the classic
Typora的使用
用recyclerReview展示Banner,很简单
微研所,微生物检验中常用的生化反应
MFC TCP communication server client demo notes vs2019
[leetcode] sum of two numbers [1]
医疗HIS行业短信发送解决方案
做生意更加务实
sort自定义函数
尝试新的可能
【qt5-tab标签精讲】Tab标签及内容分层解析
zabbix如何配置告警短信?(预警短信通知设置流程)
StrictMode带来的思考-StrictMode原理(5)
面对产业互联网的时候,甚至还用消费互联网的方式和方法去落地和实践产业互联网
Solve idea:class' xxx 'not found in module' xxx‘
Opencv basic operation 2 realizes label2rgb and converts gray-scale images into color images
Dx-11q signal relay
Service grid ASM year end summary: how do end users use the service grid?
Basic knowledge 3 - standard unit library