Hi
How to find and delete line/block from qtextedit which content for example Char 'A'.
Regards
Artur
Printable View
Hi
How to find and delete line/block from qtextedit which content for example Char 'A'.
Regards
Artur
Hope this should help
Code:
QTextEdit textEdit; textEdit.setPlainText( "How are you today\n" "I am not A Visible\n" "I am not a good\n" "I am A\n" "I am a\n" "I am B"); int i = 0; while(i < lines.size()) { if(line.contains('A')) { lines.removeAt(i); } else { i++; } } textEdit.setPlainText(lines.join("\n")); textEdit.show();