Deleting frames in QTextEdit
General and Desktop
1
Posts
1
Posters
1.0k
Views
1
Watching
-
wrote on 9 Mar 2012, 09:53 last edited by
Hi
I am experimenting with QTextEdit and frames.
I have a small app in which I insert frames in response to a menu action.
The frame gets inserted correctly but when I delete text using the backspace key I can only delete to the beginning of the frame.Does anyone know the reason for this?
the code that inserts the frame -
@void MainWindow::on_actionFrame_triggered()
{
QTextCharFormat charFormat;
charFormat.setFontPointSize(20);
ui->textEdit->textCursor().mergeCharFormat(charFormat);
ui->textEdit->textCursor().insertText(QString::number(m_frameNumber++) + "Frame");
QTextFrameFormat frameFormat;
ui->textEdit->textCursor().insertFrame(frameFormat);
}
@
ThanksGraham
1/1