文章分类 -  PyQt

本科毕业论文,淦
摘要:QColorDialog 完整代码 # Form implementation generated from reading ui file 'colorDialog.ui' # # Created by: PyQt6 UI code generator 6.3.0 # # WARNING: Any 阅读全文
posted @ 2022-05-25 09:33 deadright 阅读(47) 评论(0) 推荐(0) 编辑
摘要:QInputDialog 关键代码 country, ok = QInputDialog.getItem(self, "Input Dialog", "list of Countries", coutries, 0, False) getText 完整代码 from PyQt6.QtWidgets 阅读全文
posted @ 2022-05-25 09:18 deadright 阅读(109) 评论(0) 推荐(0) 编辑
摘要:QTableWidgetItem 列表 关键代码 table_widget = QTableWidget() # 实例化类 table_widget.setRowCount(3) table_widget.setColumnCount(3) table_widget.setItem(0, 0, QT 阅读全文
posted @ 2022-05-25 08:49 deadright 阅读(192) 评论(0) 推荐(0) 编辑
摘要:FontComboBox 关键代码 # connect signal self.fontComboBox.currentFontChanged.connect(self.change_type) # 如果ComboBox中,currentFontChanged,那么发送信号,然后获取到Index,通 阅读全文
posted @ 2022-05-24 22:18 deadright 阅读(68) 评论(0) 推荐(0) 编辑
摘要:增删改查 创建一个程序完成功能 QLineEdit.EchoMode.Normal: 4种模式 QInputDialog的getText()函数弹出标准字符串输入对话框,getText()函数原型如下: # 指向父窗口 QString QInputDialoggetText(QWidget pare 阅读全文
posted @ 2022-05-24 21:51 deadright 阅读(83) 评论(0) 推荐(0) 编辑
摘要:ListWidget 一个表单 关键代码 self.list_widget.insertItem(0, "python") # addItem的话,没有row选项 self.list_widget.clicked.connect(self.item_clicked) # 绑定选中事件,发送signa 阅读全文
posted @ 2022-05-24 16:17 deadright 阅读(121) 评论(0) 推荐(0) 编辑
摘要:QSlider 滑条 关键代码 self.slider.setOrientation(Qt.Orientation.Horizontal) # 设置方向为水平方向 self.slider.setTickPosition(QSlider.TickPosition.TicksBelow) # 设置刻度出 阅读全文
posted @ 2022-05-24 15:51 deadright 阅读(102) 评论(0) 推荐(0) 编辑
摘要:QComboBox 完整代码 from PyQt6.QtWidgets import QApplication, QWidget, QComboBox, QLabel, QHBoxLayout, QVBoxLayout from PyQt6.QtGui import QIcon, QFont imp 阅读全文
posted @ 2022-05-24 11:53 deadright 阅读(65) 评论(0) 推荐(0) 编辑
摘要:QLCDNumber QTimer QTime 关键代码 timer = QTimer() # 创建一个QTimer对象,是一个重复单次,触发信号的定时器 timer.timeout.connect(self.showLCD) # 触发条件,即计时器到点,调用showLCD函数 timer.star 阅读全文
posted @ 2022-05-24 09:58 deadright 阅读(87) 评论(0) 推荐(0) 编辑
摘要:Creating QSpinBox 重点代码 self.spinbox.valueChanged.connect(self.spin_selected) # 当值发生变化的时候,调用是spin_selected函数 完整代码 from PyQt6.QtWidgets import QApplicat 阅读全文
posted @ 2022-05-23 20:42 deadright 阅读(60) 评论(0) 推荐(0) 编辑
摘要:QCheckBox 关键方法:[].stateChanged self.check1.stateChanged.connect(self.item_selected) # 如果状态改变,则传递信号 from PyQt6.QtWidgets import QApplication, QWidget, 阅读全文
posted @ 2022-05-23 17:16 deadright 阅读(92) 评论(0) 推荐(0) 编辑
摘要:QRadioButton Method Method function isChecked it return a boolean value aof true if the button and the selected state setIcon add icon for the radio b 阅读全文
posted @ 2022-05-22 20:53 deadright 阅读(95) 评论(0) 推荐(0) 编辑
摘要:caculate 没什么好说的,只能说英语好,就是无敌。 以后每天背500个单词。 重点代码 self.pushButton_plus.clicked.connect(self.add) # 绑定事件 def add(self): fnum = int(self.lineEdit_first.tex 阅读全文
posted @ 2022-05-22 16:45 deadright 阅读(50) 评论(0) 推荐(0) 编辑
摘要:Event Handling(Signal and Slots) from PyQt6.QtWidgets import QApplication, QWidget, QPushButton, QLabel, QHBoxLayout from PyQt6.QtGui import QIcon, QF 阅读全文
posted @ 2022-05-22 15:56 deadright 阅读(56) 评论(0) 推荐(0) 编辑
摘要:布局管理 水平 horizontal from PyQt6.QtWidgets import QApplication, QWidget, QHBoxLayout, QPushButton from PyQt6.QtGui import QIcon import sys class Window(Q 阅读全文
posted @ 2022-05-22 12:30 deadright 阅读(108) 评论(0) 推荐(0) 编辑
摘要:QLineEdit 基本功能:输入单行的文本 EchoMode(回显模式) 4种回显模式 Normal 输入什么显示什么 NoEcho 输入什么不显示,但是已经提交了 Password 输入什么都显示 **** PasswordEchoOnEdit 输入什么,丢失目标以后显示***** 完整代码 f 阅读全文
posted @ 2022-05-22 11:49 deadright 阅读(48) 评论(0) 推荐(0) 编辑
摘要:from PyQt6.QtWidgets import QApplication, QWidget, QWidget, QPushButton, QMenu from PyQt6.QtGui import QIcon, QFont from PyQt6.QtCore import QSize imp 阅读全文
posted @ 2022-05-22 10:34 deadright 阅读(47) 评论(0) 推荐(0) 编辑
摘要:from PyQt6.QtWidgets import QApplication, QWidget, QLabel from PyQt6.QtGui import QIcon, QFont, QPixmap, QMovie import sys class Window(QWidget): def 阅读全文
posted @ 2022-05-22 08:28 deadright 阅读(27) 评论(0) 推荐(0) 编辑
摘要:Designer convert .ui to .py pyuic6 -x [].ui -o [].py Loading UI from PyQt6.QtWidgets import QApplication, QWidget from PyQt6 import uic class UI(QWidg 阅读全文
posted @ 2022-05-21 19:37 deadright 阅读(41) 评论(0) 推荐(0) 编辑
摘要:from PyQt6.QtWidgets import QApplication, QWidget from PyQt6.QtGui import QIcon import sys class Window(QWidget): def __init__(self): super().__init__ 阅读全文
posted @ 2022-05-21 17:21 deadright 阅读(66) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示