]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
28
authorqydysky <qydysky@foxmail.com>
Thu, 1 Oct 2020 22:26:18 +0000 (06:26 +0800)
committerqydysky <qydysky@foxmail.com>
Thu, 1 Oct 2020 22:26:18 +0000 (06:26 +0800)
Reply/qt.go

index 6aff0851d8d3c6d24a943f2e3a8920a45a738e33..c644937de68f92e46f6474bdf2b6621dce05b403 100644 (file)
@@ -53,6 +53,7 @@ func Qtdanmu() {
                QtDanmuChan = make(chan string, 10)
                QtOn = true
                // var list []string
+               t.TextCursor().InsertText("==开始==")
                for QtOn {
                        select{
                        case i :=<-QtDanmuChan:
@@ -100,10 +101,10 @@ func new(pare *widgets.QWidget, layouts *widgets.QGridLayout) (t *widgets.QTextE
 
 func text(s string, pare *widgets.QTextEdit) {
        c := pare.TextCursor()
+       c.InsertBlock()
        c.BeginEditBlock()
        c.InsertText(s)
        c.EndEditBlock()
-       c.InsertBlock()
        if pare.Document().BlockCount() > Qt_MaxMun {
                c.MovePosition(gui.QTextCursor__Start, gui.QTextCursor__MoveAnchor, 1)
                // c.BeginEditBlock()