摘要: 上面根据列表字典遍历方式,开发可能用到,需要你好好看看;直接定位每个字典的value所在行列位置; 阅读全文
posted @ 2018-09-30 17:19 zyg_100 阅读(8371) 评论(1) 推荐(0) 编辑
摘要: 该实例参考一个网上博客,但是这里也增加了个人编写习惯(这里没加入行和列的拉伸) 阅读全文
posted @ 2018-09-30 17:15 zyg_100 阅读(1299) 评论(0) 推荐(0) 编辑
摘要: 1 #demo_12:网格布局 2 import sys 3 from PyQt5.QtWidgets import QApplication,QWidget,QGridLayout,QPushButton,QLineEdit,QTextEdit,QLabel 4 5 class Example(QWidget): 6 def __init__(self): 7 ... 阅读全文
posted @ 2018-09-30 17:09 zyg_100 阅读(4456) 评论(0) 推荐(1) 编辑
摘要: 1 #demo_11:网格布局 2 import sys 3 from PyQt5.QtWidgets import QApplication,QWidget,QGridLayout,QPushButton 4 5 class Example(QWidget): 6 def __init__(self): 7 super().__init__() 8 ... 阅读全文
posted @ 2018-09-30 17:06 zyg_100 阅读(1685) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/python3 2 # -*- coding: utf-8 -*- 3 4 ''' 即横向和纵向布局:QHBoxLayout, QVBoxLayout ''' 5 6 import sys 7 from PyQt5.QtWidgets import (QWidget, QPushButton, 8 ... 阅读全文
posted @ 2018-09-30 17:02 zyg_100 阅读(3456) 评论(0) 推荐(0) 编辑
摘要: 1 import sys 2 from PyQt5.QtWidgets import QWidget,QLabel,QApplication 3 #demo_8: 绝对定位 4 5 class Example(QWidget): 6 def __init__(self): 7 super().__init__() 8 self.in... 阅读全文
posted @ 2018-09-30 16:58 zyg_100 阅读(1804) 评论(0) 推荐(0) 编辑
摘要: 1 from PyQt5.QtWidgets import QApplication,QMainWindow,QAction 2 from PyQt5.QtGui import QIcon 3 #demo_7:菜单添加action以及状态栏显示消息 4 import sys 5 class Example(QMainWindow): 6 def __init__(self):... 阅读全文
posted @ 2018-09-30 16:55 zyg_100 阅读(6353) 评论(0) 推荐(0) 编辑
摘要: 1 from PyQt5.QtWidgets import QApplication,QMainWindow 2 import sys 3 #demo_6显示状态栏 4 class Example(QMainWindow): 5 def __init__(self): 6 super().__init__() 7 self.initUI() ... 阅读全文
posted @ 2018-09-30 16:50 zyg_100 阅读(2066) 评论(0) 推荐(0) 编辑
摘要: 1 import sys 2 from PyQt5.QtWidgets import QApplication, QWidget,QToolTip,QPushButton,QMessageBox,QDesktopWidget 3 from PyQt5.QtGui import QIcon,QFont 4 from PyQt5.QtCore import QCoreApplication ... 阅读全文
posted @ 2018-09-30 16:48 zyg_100 阅读(3590) 评论(0) 推荐(0) 编辑
摘要: import sys from PyQt5.QtWidgets import QApplication, QWidget,QToolTip,QPushButton from PyQt5.QtGui import QIcon,QFont from PyQt5.QtCore import QCoreApplication #demo_4:通过一个按钮关闭窗体 class Exception(QWid... 阅读全文
posted @ 2018-09-30 16:44 zyg_100 阅读(3501) 评论(0) 推荐(0) 编辑
摘要: import sys from PyQt5.QtWidgets import QApplication, QWidget,QToolTip,QPushButton from PyQt5.QtGui import QIcon,QFont #demo_3:显示一个提示信息文本 class Exception(QWidget): def __init__(self): supe... 阅读全文
posted @ 2018-09-30 16:43 zyg_100 阅读(3720) 评论(0) 推荐(0) 编辑
摘要: import sys from PyQt5.QtWidgets import QApplication, QWidget from PyQt5.QtGui import QIcon #demo_2:显示一个窗体,设置一个图标 class Example(QWidget): def __init__(self): super().__init__() sel... 阅读全文
posted @ 2018-09-30 16:38 zyg_100 阅读(7580) 评论(1) 推荐(0) 编辑
摘要: 1、了解: PyQt5是一套绑定Qt5的应用程序UI框架。他在Python 2.x和3.x中都是可用的。该教程使用的是Python3.x。Qt库是一套最有用的GUI库。PyQt5的官方主页www.riverbankcomputing.co.uk/news。PyQt5是由Riverbank Compu 阅读全文
posted @ 2018-09-30 16:35 zyg_100 阅读(2342) 评论(0) 推荐(0) 编辑