![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PyQt
王桑的一天
最省电的语言。
酒醉无人问,病卧自煎熬。生时不逢春,死亦落蓬蒿。
展开
-
[PyQt] 记一次程序退出崩溃问题
Qt 程序退出时崩溃,这种问题很难找。最终使用逐步在初始化函数中,提前 return 的方式,定位到导致崩溃的代码。原来是循环相互为父导致的。即 A 设置 B 为父,B 又设置 A 为父原创 2020-08-03 09:35:08 · 742 阅读 · 0 评论 -
[PyQt] QTableView 添加代理显示控件
照着《Qt C++ Gui编程》里照葫芦画飘成功了,我好棒棒添加QComBox也成功class SpinBoxDelegate(QItemDelegate): def __init__(self, column, parent=None): super(SpinBoxDelegate, self).__init__(parent) self.column...原创 2019-06-17 14:31:57 · 2344 阅读 · 1 评论 -
[PyQt] 自定义QSlider支持鼠标点击和滚轮事件
from PyQt4.QtGui import *from PyQt4.QtCore import *class progressSlider(QSlider): def __init__(self, orientation, parent=None): super(progressSlider, self).__init__(orientation, parent)原创 2015-08-05 16:54:22 · 5791 阅读 · 0 评论 -
[PyQt] 在QLabel上用drawText实现文字滚动
from PyQt4.QtGui import *from PyQt4.QtCore import *try: _fromUtf8 = QString.fromUtf8except AttributeError: def _fromUtf8(s): return sclass scrollTextLabel(QLabel): def __init_原创 2015-08-04 16:52:59 · 9566 阅读 · 2 评论