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

Popular posts from this blog

qt - Using float or double for own QML classes -

json - ORA-06502: PL/SQL: numeric or value error: character string buffer too small - Convert Clob to varchar2 -

ios - Swift Array Resetting Itself -