- 博客(9)
- 资源 (4)
- 收藏
- 关注
原创 VSCode + python2.7 +pyqt4 环境搭建
已经安装好了多个版本python,其中某个版本有pyqt指定python版本路径:https://code.visualstudio.com/docs/python/environments#_environment-variable-definitions-fileFile(Codeon macOS) >Preferences>Settingsmenu com...
2019-11-26 16:07:48 777
原创 Connvert paintEvent of QPlainTextEdit to Pyqt
def paintEvent(self,event): painter=QPainter(self.viewport()) offset=QPointF(self.contentOffset()) er = event.rect() viewportRect = self.viewport().rect() ed...
2018-11-29 14:58:27 243
转载 Sample for QtextTable
ui->setupUi(this); QTextCursor cursor=ui->textEdit->textCursor(); cursor.setPosition(0); QTextTableFormat tableFormat; tableFormat.setCellPadding(5); tableFormat.setAlig...
2018-11-27 17:00:17 387
原创 qtextlayout-manual-line-breaking
Maybe useful someday ,will test later . Currently try to modify the paintEvent in derived classhttps://stackoverflow.com/questions/40076670/qtextlayout-manual-line-breaking
2018-11-26 16:57:19 382
转载 About override paintEvent QPainter not work
Overriding QPaintEvents in PyQtI'm trying to create a TextEdit widget that will have a delimiter line. As a start, I've created a MyTextEdit class (as a subclass of a QTextEdit) and overridden its p...
2018-11-23 14:41:19 255
原创 Sample of standalone in python
from lxml import etreetree = etree.fromstring(templateXml).getroottree() # NOTE: .getroottree()xmlFileOut = '/Users/User1/Desktop/Python/Done.xml' with open(xmlFileOut, "w") as f: f.w
2018-01-03 12:17:26 179
原创 A class for write log
class logger(object): def __init__(self): self.logPath=sys.path[0]+'/log.txt' def writeLog(self,logString): if not os.path.exists(self.logPath): os.mknod(self.
2018-01-02 15:00:41 152
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人