fixed text-based keyframes
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#include "texteditex.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
TextEditEx::TextEditEx(QWidget *parent) : QTextEdit(parent) {}
|
||||
|
||||
void TextEditEx::setPlainTextEx(const QString &text) {
|
||||
blockSignals(true);
|
||||
|
||||
int pos = textCursor().position();
|
||||
|
||||
setPlainText(text);
|
||||
|
||||
QTextCursor newCursor(document());
|
||||
newCursor.setPosition(pos);
|
||||
setTextCursor(newCursor);
|
||||
|
||||
blockSignals(false);
|
||||
}
|
||||
Reference in New Issue
Block a user