Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @language python
- def insertHdlTime():
- tree = c.frame.tree
- qwidg,lwidg = tree.editLabel(c.p)
- # qwidg is a QLineEdit
- # lwidg is a leoQtHeadlineWidget
- idx = qwidg.cursorPosition()
- g.es(idx, color='green')
- hdlBase = p.h
- pre = hdlBase[:idx]
- post = hdlBase[idx:]
- time = c.getTime(body=False)
- p.h = ''.join([pre, time, post])
- insertHdlTime()
Advertisement
Add Comment
Please, Sign In to add comment