PyQt5

1. PyQt5 tutorial ZetCode 笔记

  1. Date and time
    1. Current date and time
      a. Qt.ISOData
      b. DefaultLocaleLongDate
    2. UTC time
    3. Number of days
    4. Difference in days
    5. Date arithmetic
    6. Daylight saving time
    7. Unix epoch
    8. Julian day
      便于时间相减,直接计算天数
  2. Hello, world
    1. Simple example
    2. Icon
    3. Tooltip
      a. Btn.sizeHint()
    4. closeEvent
      qbtn.clicked.connect(QApplication.instance().quit)
    5. Message box
    6. Center
  3. Menus and toolbar
    1. Statusbar
    2. Menu
    3. Sub menu
    4. Check menu
    5. Context menu
    6. Toolbar
    7. Main window
  4. Layout
    1. QHBoxlayout
    2. QGridLayout
  5. Event and signal
    1. LED demo
    2. Key event handler
    3. Event object, mouse event
    4. Push btn event sender
    5. Emitting signal
  6. Dialog
    1. QDialog
    2. QcolorDialog and QFrame
    3. QFontDialog, btn.setSizePolicy
    4. QFileDialog, Qaction.triggered, QMainWindow
  7. Qwidge1
    1. QCheckBox
    2. Toggle button, color demo, Qcolor.setRed
    3. Qslider
    4. QProgressBar
    5. QCalendarWidge
  8. QWidget2
    1. Qpixmap, Qlabel.setPixmap
    2. QLineEdit
    3. Qsplitter
    4. QComBox 复选框
  9. Drag and Drop 稍微还是有些不理解
    1. Qdrag
    2. QMineData
    3. dragEnterEvent仅获取对应的类型
    4. dropEvent设置drop时的动作
  10. QPainter
    1. Draw text
    2. Draw point
    3. Draw color
    4. drawRect, setBrush
    5. Qpen(line, curves, rectangle)
    6. Qbrush
    7. BezierCurve

2. Python and PyQt: Building a GUI Desktop Calculator 笔记

MVC典型流程,先画View,再设计控制逻辑Control,最后再设计计算模型Model,分步骤实现。

3. Qt Designer and Python: Build Your GUI Applications Faster 笔记

coding一个相当完整的mainwindow

4. 进一步熟悉

书籍《PyQt快速开发与实践》中介绍了一些基本内容,后续可以进一步掌握,包括设计师的使用,基础组件,布局管理,高级组件等,还是要结合实战进行更深入的学习和使用才行。

5. PythonQwt

QWT可以用于生成各种统计图,给具有专业技术背景的程序提供GUI组件和实用类,以基于2D方式的窗体不见来显示数据。

PythonQwt
Qwgt User’s Guide 6.2.0
Qt之Qwt曲线绘制

5.1. curve fitting

event_filter_demo.py

制作曲线调整的工具,为加速开发就基于event filter demo修改,可以适配7条曲线的调试和保存,主要改动如下:

  1. 支持鼠标和键盘拖动曲线,固定Y方向
  2. 显示7条曲线,可隐藏
  3. 支持曲线的导入和导出,暂时指定文件名

6. 参考链接

  1. The complete PyQt5 tutorial — Create GUI applications with Pyth on
  2. PyQt5 Reference Guide 官方文档
  3. PyQt5 tutorial ZetCode
  4. PyQt-Examples Github contains more in-depth examples for different topics
  5. PyQt5-Tutorial-Examples Sources and images for ZetCode’s PyQt5 tutorial
  6. PyQt5图形界面编程(目录) 知乎
  7. realpython的几个相关课程
    1. Python and PyQt: Building a GUI Desktop Calculator 入门制作一个计算器,手把手指导,很不错
    2. Qt Designer and Python: Build Your GUI Applications Faster QtDesigner的简单使用
    3. PyQt Layouts: Create Professional-Looking GUI Applications
    4. Build a Bulk File Rename Tool With Python and PyQt
    5. Python and PyQt: Creating Menus, Toolbars, and Status Bars
    6. Handling SQL Databases With PyQt: The Basics
    7. Use PyQt’s QThread to Prevent Freezing GUIs
    8. Build a Contact Book With Python, PyQt, and SQLite
    9. 相关的repo materials
  8. Qt Designer Manual
  9. [ PyQt入门教程 ] Qt Designer工具的使用 使用qtdesigner实现登录框和业务逻辑代码
0%