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

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -