Quote Originally Posted by anda_skoa View Post
That's not really related to QTextEdit, just basic string manipulation.
http://doc.qt.io/qt-5/qstring.html#insert

Cheers,
_
Thanks!
that works but not correctly! look:



as you can see, after several insert, it cannot put ",0x" string anymore. why? the code is this:

Qt Code:
  1. void MainWindow::on_pushButton_clicked()
  2. {
  3. QString txt = ui->textEdit->toPlainText();
  4.  
  5. for (quint32 t = 0 ; t <= (txt.size()/8) ; t = t+11 )
  6. {
  7. txt.insert( t , QString(",0x"));
  8.  
  9. }
  10.  
  11. ui->textEdit->setText(txt);
  12. }
To copy to clipboard, switch view to plain text mode