上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 44 下一页
摘要: import sys from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QWidget, QApplication # 创建一个Icon类,继承Qwidget类 class Icon(QWidget): def __init__(se 阅读全文
posted @ 2020-07-30 14:16 胸怀丶若谷 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 1 """关闭主窗口""" 2 3 from PyQt5.QtWidgets import QMainWindow, QHBoxLayout, QPushButton, QApplication, QWidget 4 import sys 5 6 class WinForm(QMainWindow) 阅读全文
posted @ 2020-07-30 14:15 胸怀丶若谷 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1 """主窗口居中""" 2 from PyQt5.QtWidgets import QDesktopWidget, QApplication, QMainWindow 3 import sys 4 5 class Winform(QMainWindow): 6 7 def __init__(se 阅读全文
posted @ 2020-07-30 14:06 胸怀丶若谷 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 1 """创建主窗口""" 2 import sys 3 from PyQt5.QtWidgets import QMainWindow, QApplication 4 from PyQt5.QtGui import QIcon 5 6 class MainWindow(QMainWindow): 阅读全文
posted @ 2020-07-30 14:02 胸怀丶若谷 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 1 import sys 2 from PyQt5.QtWidgets import QApplication,QWidget,QPushButton 3 4 app = QApplication(sys.argv) 5 widget = QWidget() 6 btn = QPushButton( 阅读全文
posted @ 2020-07-30 14:00 胸怀丶若谷 阅读(253) 评论(0) 推荐(0) 编辑
摘要: QWidget有两种常用的几何结构: 1.不包含外边各种边框的几何结构。 一般情况下,不包含边框的部分是客户区,这里面就i是我们正常操作的地方,可以添加子控件。这部分是一个长方形,会有大小和位置。大小是指宽度和高度;位置就是指这个长方形在屏幕上的位置。在Qt中保存的这个长方形使用的是QRect类,这 阅读全文
posted @ 2020-07-30 13:46 胸怀丶若谷 阅读(170) 评论(0) 推荐(0) 编辑
摘要: PyQt使用统一的坐标系统来定位窗口空间的位置和大小。左上角为原点(0,0). 阅读全文
posted @ 2020-07-30 13:24 胸怀丶若谷 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 方法和描述 addToolBar():添加工具栏 centralWidget():返回窗口中心的一个空间,未设置时返回NULL menuBar(): 返回主窗口的菜单栏 setCentralWidget():设置窗口中心的控件 setStausBar(): 设置状态栏 statusBar():获得状 阅读全文
posted @ 2020-07-30 10:56 胸怀丶若谷 阅读(120) 评论(0) 推荐(0) 编辑
摘要: QMainWindow、QWidgwt和QDialog三个类都是用来创建窗口的,可以直接使用,也可以继承后再使用。 QMainWindow窗口可以包含菜单栏、工具栏、状态栏、标题栏等。是最常见的窗口像是。 QDialog是对话窗口的基类。对话框主要用来执行短期任务,或者与用户进行互动。 如何使用: 阅读全文
posted @ 2020-07-30 10:39 胸怀丶若谷 阅读(492) 评论(0) 推荐(0) 编辑
摘要: # 设置单元格格式 # 日期所在的列 datelist = [16, 17, 18] for row in range(2, rows3 + 1): for column in datelist: datevalue = ws.cell(row=row, column=column).value # 阅读全文
posted @ 2020-07-28 10:57 胸怀丶若谷 阅读(267) 评论(0) 推荐(0) 编辑
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 44 下一页