Below lines are in A QPlainTextEdit:
I want to delete a matched line with line variable help. For example, I want to delete
line 2 s44 grade
with the help of line variable(line = "line 2")
I am able to delete the particular text with below code:
item = "line 2"
text = self.project_length_lanes_plainedit.toPlainText()
text = text.replace(item, '')
_list = text.split()
text = '\n'.join(_list)
self.project_length_lanes_plainedit.setPlainText(text)
but I want to delete the entire line. How can I do that?