当前位置:网站首页>[Qt5 basics] random number display
[Qt5 basics] random number display
2022-07-01 01:32:00 【Teacher Detian】
Display random numbers through a display similar to a calculator
- Exercise layout
- Practice defining buttons
- Practice button signals
- Practice using the display
Constructors
Window appearance
Slot function
from PyQt5.Qt import *
import sys
app = QApplication([])
class Window(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle('QLCDNumber usage ')
self.resize(300,150)
self.setup_ui()
def setup_ui(self):
vbox = QVBoxLayout()
self.lcd = QLCDNumber()
self.lcd.setStyleSheet('background-color:yellow')
vbox.addWidget(self.lcd)
self.btn = QPushButton('rando
边栏推荐
- Basic knowledge II - Basic definitions related to sta
- Dx-11q signal relay
- Introduction and principle analysis of cluster and LVS
- zabbix如何配置告警短信?(预警短信通知设置流程)
- Install redis database and download redis Desktop Manager in win11
- Chromatic judgement bipartite graph
- Use strictmode strictmode principle (1)
- 短信在企业中的应用有哪些?
- Open3D 点云包围盒
- Open3D 点云颜色渲染
猜你喜欢
Dx-11q signal relay
gin 配置文件
Q play soft large toast to bring more comfortable sleep
数字IC设计流程总结
编译安装oh-my-zsh
Exploration and practice of "flow batch integration" in JD
zabbix如何配置告警短信?(预警短信通知设置流程)
Openmv and k210 of the f question of the 2021 video game call the openmv API for line patrol, which is completely open source.
Poor students can also play raspberry pie
微生物健康,食品微生物检测为什么很重要
随机推荐
直播商城源码,实现左右联动商品分类页面
Chromatic judgement bipartite graph
[deepin] common sets
友盟(软件异常实时监听的好帮手:Crash)接入教程(有点基础的小白最易学的教程)
mysql插入\更新前+判断条件
一站式洞察行业热点,飞瓜数据B站新功能「流量大盘」上线!
Why build a personal blog
What will Web3 bring in the future?
Relationship between ASCII, Unicode, GBK, UTF-8
用recyclerReview展示Banner,很简单
Exploration and practice of "flow batch integration" in JD
图灵奖得主LeCun指明AI未来的出路在于自主学习,这家公司已踏上征途
日志 logrus第三方库的使用
K210 site helmet
Sun Yuchen told Swiss media Bilan that the bear market will not last long
Locking relay ydb-100, 100V
Two position relay st2-2l/ac220v
visual studio 2019 下载
[dynamic planning] path dp:931 Minimum Falling Path Sum
【Qt5-基础篇_1】从0开始,德天老师和你一起学习——窗口简介