首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • PyQT6 GUI编程开发桌面软件(2024新版)

    PyQt6是一个创建图形用户界面应用程序的工具包,它是Qt6的Python绑定。 Qt是一个跨平台的C++图形用户界面应用程序开发框架,广泛用于开发GUI程序,也可用于开发非GUI程序,比如控制台工具和服务器。 与Qt6的紧密集成:作为Qt6的Python绑定,PyQt6可以访问Qt6的所有功能。使用PyQt6开发应用程序的一般步骤:安装PyQt6:可以通过pip安装PyQt6。 PySide6和PyQt6的转换工具PySide6的转换工具是pyside6-uic,PyQt6中的转换工具是pyuic6。 这些文件可以使用pyuic6(针对PyQt6)或pyside6-uic(针对PySide6)工具转换为.py文件。

    3.7K10编辑于 2024-11-08
  • 来自专栏瓜大三哥

    matlab GUI基础6

    data={2001,76,88;2002,77,99} success=xlswrite('student.xls',data,'sheet2','A6')

    91860发布于 2018-02-26
  • 来自专栏编码视界

    PySide6 GUI 编程(6):QPushButton的使用

    基础使用 直接实例化 QPushButton import sys from PySide6.QtWidgets import QApplication, QPushButton app = QApplication 这是按钮的提示信息') # window.setText('Button Text 按钮展示的信息') window.show() app.exec() 从 QMainWindow 继承 from PySide6. button = MyPushButton() button.show() app.exec() 使用信号与槽对按钮的点击动作进行响应 实现代码 import sys from PySide6.

    1.2K45编辑于 2024-08-23
  • 来自专栏编码视界

    PySide6 GUI 编程(35):QPalette 小结

    QPalette的ColorRole类型示例代码from PySide6.QtGui import QFont, QPalette, Qtfrom PySide6.QtWidgets import QApplication

    67553编辑于 2024-08-26
  • 来自专栏科技专栏

    Python 6GUI界面开发的库

    快速指南 Python作为一门功能强大的编程语言,不仅可以处理数据和算法,还能创建美观实用的图形用户界面(GUI)。 本文将介绍6个常用的Python GUI库,包括它们的特点、使用方法和代码示例,帮助开发者选择最适合自己项目的工具。 1. Tkinter - Python标准GUI库 Tkinter是Python自带的标准GUI库,无需额外安装,特别适合初学者入门。它提供了基本的控件和布局管理器,可以快速创建简单的桌面应用界面。 window.close() 6. Dear PyGui - 现代轻量级GUI库 Dear PyGui是一个相对较新的Python GUI库,采用即时模式设计,适合数据可视化和轻量级应用。 希望这篇文章能帮助你找到最适合的Python GUI库!如果你有任何问题或经验想要分享,欢迎在评论区留言讨论~

    16710编辑于 2026-07-20
  • 来自专栏编码视界

    PySide6 GUI 编程(12):QSpinBox的使用

    示例代码from PySide6.QtWidgets import QApplication, QDoubleSpinBox, QMainWindow, QSpinBox, QVBoxLayout, QWidgetdef

    77042编辑于 2024-07-24
  • 来自专栏编码视界

    PySide6 GUI 编程(14):QDial的使用

    示例代码from PySide6.QtWidgets import QApplication, QDial, QMainWindowdef dial_mouse_changed(value: int):

    50642编辑于 2024-07-24
  • 来自专栏编码视界

    PySide6 GUI 编程(9):QComboBox的使用

    基本使用 静态选项 from datetime import datetime from PySide6.QtWidgets import QApplication, QComboBox, QLabel ins = MyCombobox() ins.show() app.exec() 运行效果 编辑列表 from datetime import datetime from PySide6. 测试代码 from PySide6.QtWidgets import QApplication, QComboBox, QVBoxLayout, QWidget def main(): app QComboBox.InsertPolicy = ... # 0x5 InsertAlphabetically : QComboBox.InsertPolicy = ... # 0x6 按照字母顺序自动排序的插入规则 from PySide6.QtWidgets import QApplication, QComboBox, QMainWindow class MyComboBox

    1.7K42编辑于 2024-07-22
  • 来自专栏编码视界

    PySide6 GUI 编程(24):QDialog以及QDialogButtonBox

    示例代码 from PySide6.QtWidgets import QApplication, QDialog if __name__ == '__main__': app = QApplication 示例代码 from __future__ import annotations from PySide6.QtCore import QSize from PySide6.QtWidgets import QDialogButtonBox 示例代码 from __future__ import annotations import sys from datetime import datetime from PySide6.

    1.4K23编辑于 2024-08-12
  • 来自专栏编码视界

    PySide6 GUI 编程(42):QPainter 的使用

    self.setToolTip('A PySide6 GUI Application Demo') # 设置画布大小 self.pixmap = QPixmap(400 self.setToolTip('A PySide6 GUI Application Demo') # 设置画布大小 self.pixmap = QPixmap(400 self.setToolTip('A PySide6 GUI Application Demo') # 设置画布大小 self.pixmap = QPixmap(400 self.setToolTip('A PySide6 GUI Application Demo') # 设置画布大小 self.pixmap = QPixmap(400 \n你好,GUI 编程!

    1.6K87编辑于 2024-09-15
  • 来自专栏编码视界

    PySide6 GUI 编程(49): 托盘程序QSystemTrayIcon

    示例代码from __future__ import annotationsimport sysfrom random import randintfrom PySide6.QtCore import Slotfrom PySide6.QtGui import QAction, QIconfrom PySide6.QtWidgets import QApplication, QMenu, QSystemTrayIcon

    61135编辑于 2024-09-19
  • 来自专栏编码视界

    PySide6 GUI 编程(8):QCheckBox的使用

    基础用法单选框示例代码from PySide6.QtCore import Qtfrom PySide6.QtWidgets import QApplication, QCheckBox, QMainWindowdef QApplication() ins = MyCheckBox() ins.show() app.exec()运行效果CheckBox 可以设置为三态属性示例代码from PySide6. QtCore import Qtfrom PySide6.QtWidgets import QApplication, QCheckBox, QMainWindowdef show_check_state ins = MyCheckBox() ins.show() app.exec()运行效果基于 CheckBox 实现多选、全选、全不选效果核心设置完整代码示例from PySide6. QtCore import Qtfrom PySide6.QtWidgets import QApplication, QCheckBox, QMainWindow, QVBoxLayout, QWidgetclass

    1.2K42编辑于 2024-07-21
  • 来自专栏编码视界

    PySide6 GUI 编程(7):QLabel的使用

    QLabel 的简单使用字符展示设置字体大小并展示from PySide6.QtCore import Qtfrom PySide6.QtWidgets import QApplication, QLabel __init__() label = QLabel() label.setText('你好,PySide6! \n\nHello, PySide6!') QApplication() ins = LabelFont() ins.show() app.exec()实现效果展示图片QLabel 展示静态图片并设置图片自适应大小from PySide6. QtCore import QSize, Qtfrom PySide6.QtGui import QPixmapfrom PySide6.QtWidgets import QApplication, QLabel

    1.1K33编辑于 2024-07-20
  • 来自专栏编码视界

    PySide6 GUI 编程(41):QTableView 与 QTreeView

    QTableView示例代码from __future__ import annotationsimport sysfrom PySide6.QtGui import QStandardItem, QStandardItemModelfrom PySide6.QtWidgets import QApplication, QMainWindow, QTableView, QVBoxLayout, QWidgetclass TableModel window.show() sys.exit(app.exec())运行效果QTreeView示例代码from __future__ import annotationsimport sysfrom PySide6. QtGui import QStandardItem, QStandardItemModelfrom PySide6.QtWidgets import QApplication, QMainWindow

    1.5K56编辑于 2024-09-01
  • 来自专栏编码视界

    PySide6 GUI 编程(3):信号槽机制

    按钮对应会产生三种状态: 按钮被按下 按钮被释放 按钮完成了一次点击 其中最后一个状态,是在按下和释放两者都完成之后才会产生的 对应的代码我们这样来模拟: import time from PySide6. 自定义信号与槽 from PySide6.QtCore import QObject, Signal class Emitter(QObject): my_signal_0 = Signal 信号与参数个数需要匹配 信号与参数个数不匹配时的异常 当信号发送时参数个数不匹配时会抛出错误: emitter.emit_signal_1('one', 'two') 信号的重载 信号的重载在 PySide6 示例代码: import sys from PySide6.QtCore import QObject, Signal, Slot from PySide6.QtWidgets import QApplication

    1.8K64编辑于 2024-05-19
  • 来自专栏编码视界

    PySide6 GUI 编程(13):QSlider的使用

    示例代码from PySide6.QtCore import Qtfrom PySide6.QtWidgets import QApplication, QLayout, QMainWindow, QSlider

    61931编辑于 2024-07-24
  • 来自专栏编码视界

    PySide6 GUI 编程(10):QListWidget的使用

    基本使用默认属性from PySide6.QtWidgets import QApplication, QListWidget, QMainWindowdef text_changed(i: str): QApplication() ins = MyListWidget() ins.show() app.exec()运行效果不同Selection Mode下的效果示例代码from PySide6. QtCore import QItemSelectionfrom PySide6.QtWidgets import QApplication, QComboBox, QListWidget, QMainWindow

    1.3K42编辑于 2024-07-22
  • 来自专栏编码视界

    PySide6 GUI 编程(50): 完结篇

    PySide6 系列总结完结陈词在 PySide6 中,组件的多样性支持了各种不同的开发需求,从基础界面组件到高级界面组件,再到对话框、消息、布局管理等。 对于图像展示,PySide6 提供了 QPixmap、QLabel 和 QIcon 这三种主要的组件,它们各自适用于不同的场景。 QPixmap 是处理和显示位图图像的基础类,适合于需要频繁操作图像内容的应用,如图像编辑软件。 理解这些组件的核心作用和使用限制是高效利用 PySide6 开发应用的关键。每个组件都有其特定的使用注意事项,例如是否需要指定 parent,这对于资源管理和内存泄漏的防范尤为重要。

    1.7K44编辑于 2024-09-20
  • 来自专栏编码视界

    PySide6 GUI 编程(11):QLineEdit的使用

    编辑框的基本操作编辑动作与响应from PySide6.QtWidgets import QApplication, QLineEdit, QMainWindowclass MyLineEdit(QMainWindow ins = MyLineEdit() ins.show() app.exec()核心步骤拆解回车响应编辑与编辑完成时的动作响应最大字符提示占位符展示选中内容与响应from PySide6.

    77733编辑于 2024-07-22
  • 来自专栏编码视界

    PySide6 GUI 编程(32):QMouseEvent 鼠标事件

    示例代码from __future__ import annotationsimport sysfrom datetime import datetimefrom PySide6.QtCore import Qtfrom PySide6.QtGui import QMouseEventfrom PySide6.QtWidgets import QApplication, QLabel, QMainWindow __init__() self.setWindowTitle('Mouse Events Demo') self.setToolTip('A PySide6 GUI Application

    1.1K33编辑于 2024-08-23
领券