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 -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -