
PyQt快速开发与实战
Tsai时越
记录计算机技术学习与分享
展开
-
PyQt5 信号槽
# -*- coding: utf-8 -*-from PyQt5.QtCore import QObject, pyqtSignal# 信号对象class QTypeSignal(QObject): # 定义一个信号 sendpath = pyqtSignal(str) def __init__(self): super(QTypeSignal, self).__init__() def run(self): # 发射信号原创 2021-01-05 01:24:29 · 216 阅读 · 0 评论 -
PyQT5 tableWidget显示图片
# -*- coding: utf-8 -*-''' 【简介】 PyQT5中单元格改变每行单元格显示的图标大小例子'''import sysfrom PyQt5.QtWidgets import *from PyQt5.QtGui import *from PyQt5.QtCore import *class Table(QWidget): def __init__(self): super().__init__() self.in原创 2020-12-28 11:18:17 · 4064 阅读 · 0 评论 -
PyQt5 中 QTextEdit 多行文本框例子
# -*- coding: utf-8 -*-''' 【简介】 PyQt5中 QTextEdit例子'''from PyQt5.QtWidgets import QApplication, QWidget, QTextEdit, QVBoxLayout, QPushButtonimport sysclass TextEditDemo(QWidget): def __init__(self, parent=None): super(TextEditDemo原创 2020-12-27 23:31:23 · 532 阅读 · 0 评论 -
PyQt5 中 QLineEdit例子
# -*- coding: utf-8 -*-''' 【简介】 PyQt5中 QLineEdit例子'''from PyQt5.QtWidgets import QApplication, QLineEdit, QWidget, QFormLayoutfrom PyQt5.QtGui import QIntValidator, QDoubleValidator, QFontfrom PyQt5.QtCore import Qtimport sysclass lineEdit原创 2020-12-27 23:10:38 · 493 阅读 · 0 评论 -
PyQt5 中 QLineEdit的验证器例子
# -*- coding: utf-8 -*-''' 【简介】 PyQt5中 QLineEdit的验证器例子'''from PyQt5.QtWidgets import QApplication, QLineEdit, QWidget, QFormLayoutfrom PyQt5.QtGui import QIntValidator, QDoubleValidator, QRegExpValidatorfrom PyQt5.QtCore import QRegExpimport原创 2020-12-27 22:36:03 · 419 阅读 · 0 评论 -
PyQt5中 QLineEdit.EchoMode 占位符效果例子
# -*- coding: utf-8 -*-''' 【简介】 PyQt5中 QLineEdit.EchoMode效果例子'''from PyQt5.QtWidgets import QApplication, QLineEdit, QWidget, QFormLayoutimport sysclass lineEditDemo(QWidget): def __init__(self, parent=None): super(lineEditDemo,原创 2020-12-27 22:32:12 · 542 阅读 · 0 评论 -
PyQT5 中Qlabel例子
# -*- coding: utf-8 -*-''' 【简介】 PyQT5中Qlabel例子'''from PyQt5.QtWidgets import QApplication, QLabel, QWidget, QVBoxLayoutfrom PyQt5.QtCore import Qtfrom PyQt5.QtGui import QPixmap, QPaletteimport sysclass WindowDemo(QWidget): def __init原创 2020-12-27 22:03:22 · 374 阅读 · 0 评论 -
PyQT5 中气泡提示
# -*- coding: utf-8 -*-''' 【简介】 PyQT5中气泡提示'''import sysfrom PyQt5.QtGui import QIcon,QFontfrom PyQt5.QtWidgets import QWidget,QApplication,QToolTip,QPushButton,QHBoxLayoutclass IconClass(QWidget): def __init__(self,parent=None):原创 2020-12-27 16:35:57 · 1133 阅读 · 0 评论 -
PyQT5 中关闭窗体例子
# -*- coding: utf-8 -*-''' 【简介】 PyQT5中关闭窗体例子'''from PyQt5.QtWidgets import QMainWindow, QHBoxLayout, QPushButton, QApplication, QWidgetimport sysclass WinForm(QMainWindow): def __init__(self, parent=None): super(WinForm, self).原创 2020-12-27 16:22:24 · 702 阅读 · 0 评论 -
PyQt5 QCalendar是一个日历控件
''' 【简介】 PyQt5中 QCalendarWidget 例子'''import sysfrom PyQt5 import QtCorefrom PyQt5.QtGui import *from PyQt5.QtWidgets import *from PyQt5.QtCore import QDateclass CalendarExample(QWidget): def __init__(self): super(CalendarExampl原创 2020-12-27 16:06:25 · 161 阅读 · 0 评论 -
PyQt5 主窗口显示居中
# -*- coding: utf-8 -*-''' 【简介】 PyQT5将窗口放在屏幕中间例子'''from PyQt5.QtWidgets import QDesktopWidget, QApplication, QMainWindowimport sysclass Winform(QMainWindow): def __init__(self, parent=None): super(Winform, self).__init__(parent)原创 2020-12-27 15:58:07 · 969 阅读 · 0 评论