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

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -