Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
QTextEdit でキャリッジ位置を変更する方法が見つかりません。setText(または setPlainText) メソッドを使用してテキストを追加し、この改行の後が QTextEdit 入力フィールドの先頭にあり、最後の記号の直後にしたいのです。
QTextCursor cursor = myQTextEdit.textCursor(); cursor.movePosition(QTextCursor::End); myQTextEdit.setTextCursor(cursor);
または、うまくいかない場合は、2 行目と 3 行目を入れ替えます。