From: qydysky Date: Sun, 4 Oct 2020 16:18:35 +0000 (+0800) Subject: Qt窗内进行选中时暂停 X-Git-Tag: v0.2.0^2^2 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=7a4e4b9e5e4697c3088a1a8c0ac1cc79b0f747b6;p=bili_danmu%2F.git Qt窗内进行选中时暂停 --- diff --git a/Reply/qt.go b/Reply/qt.go index 2c79d57..f610659 100644 --- a/Reply/qt.go +++ b/Reply/qt.go @@ -117,6 +117,7 @@ func new(pare *widgets.QWidget, layouts *widgets.QGridLayout) (t *widgets.QTextE func text(s string, pare *widgets.QTextEdit) { c := pare.TextCursor() + if c.HasSelection() {return}//用户选择,暂停 c.MovePosition(gui.QTextCursor__End, gui.QTextCursor__MoveAnchor, 1) c.InsertBlock() c.BeginEditBlock()