How to change selected text in Qt? -
how can store in qstring
selected text, typed in qtextedit
, change (for example toupper()
) , change selected in qtextedit
?
this can done through qtextcursor
api:
qtextcursor cursor = textedit->textcursor(); if(cursor.hasselection()) { cursor.inserttext(cursor.selectedtext().toupper()); }
Comments
Post a Comment