Is it possible to remove a string from a QTextEdit? I am adding them using a QTreeWidget and QPushButton when I press on the QTreeWidgetItem it turns the item into a string then when I press on my QPushButton it puts the string into a QTextEdit, but what I would like to do is when I click on any QTreeWidgetItems it will turn it into a string then I press another QPushButton and it will see if that "string" is in the QTextEdit and if it is it will remove it.
An Example:
Select item "Apple" from QTreeWidgetItem.
Creates string: QString item = "Apple";
Click on my QPushButton ("ADD").
AddsPlainText: QTextEdit->setPlainText(item);
Select item "Apple" from QTreeWidgetItem.
Creates string: QString item = "Apple";
Click on my QPushButton ("REMOVE");
finds string in QTextEdit: ?????????;
removes string from QTextEdit: ??????;




Reply With Quote
Bookmarks