当前位置:网站首页>【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()
边栏推荐
- DC学习笔记正式篇之零——综述与基本流程介绍
- MFC TCP communication server client demo notes vs2019
- Golang treasure house recommendation
- 人穷志不短,穷学生也能玩转树莓派
- fluttertoast
- None of the following candidates is applicable because of a receiver type mismatch
- K210门禁毕设
- About the general input operation mode of unity
- Xjy-220/43ac220v static signal relay
- JS方法大全的一个小文档
猜你喜欢

Golang treasure house recommendation

流批一体在京东的探索与实践

Service grid ASM year end summary: how do end users use the service grid?

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

Poor students can also play raspberry pie

孔乙己第一问之服务通信知多少?

Koa koa combine routes sub route management

双位置继电器DLS-5/2 DC220V

For the first time in more than 20 years! CVPR best student thesis awarded to Chinese college students!

软件开发完整流程
随机推荐
Unhandled Exception: MissingPluginException(No implementation found for method launch on channel)
DC学习笔记正式篇之零——综述与基本流程介绍
软件开发完整流程
None of the following candidates is applicable because of a receiver type mismatch
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"?
孔乙己第一问之服务通信知多少?
探索互联网时代STEAM教育创新之路
(学习力+思考力) x 行动力,技术人成长的飞轮效应总结
Orb-slam2 source code learning (II) map initialization
About the general input operation mode of unity
二季度最后一天
Tcp/ip protocol stack, about TCP_ RST | TCP_ ACK correct attitude
个人博客搭建与美化
Parity linked list [two general directions of linked list operation]
Locking relay ydb-100, 100V
一些本质的区别
Xjy-220/43ac220v static signal relay
StrictMode分析Registion-StrictMode原理(4)
mustache语法
Fluent JSON serialization deserialization