i have a qtextedit, and a button to choose a font. when i change font the whole textedit's font changed, but i want to change the font right after the cursor pos.
You need to modify the document char format. You can do this using "QTextEdit::setCurrentCharFormat":http://qt-project.org/doc/qt-4.8/qtextedit.html#setCurrentCharFormat
Hope it helps
i couldn't use it and my problem is not solved. here is a part of my code
it's the slot for a button to change the QTextEdit font
but i want to change the font after cursor, not the whole QTextEdit
@ QFont ft=QFontDialog::getFont(&ok,QFont("Arial",18),newfrm,tr("pick a font"));
Why couldn't you use it ?
i think i got it wrong and it didn't work if you can explain more. thanks
Then show what you tried so we can work on that