Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Deleting frames in QTextEdit
Qt 6.11 is out! See what's new in the release blog

Deleting frames in QTextEdit

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GrahamL
    wrote on last edited by
    #1

    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);
    }
    @
    Thanks

    Graham

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved