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. Implementing multi-selection in QTextEdit
Forum Updated to NodeBB v4.3 + New Features

Implementing multi-selection in QTextEdit

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 2.3k 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.
  • _ Offline
    _ Offline
    _DarkAngel_
    wrote on last edited by
    #1

    Hi all,

    I'm developing a QTextEdit-based editor, and I need to implement "block mode". In that mode, rectangular blocks must be selected, instead of standard continuous selection. The pic below illustrates what I mean.

    !http://rghost.ru/37125498/image.png(the pic)!

    To be honest, I've already implemented that mode using the QTextEdit::ExtraSelection class and setExtraSelections() function, but the code looks not very well and there are still some issues.

    So, any ideas? All I've googled is a suggestion to use Q3TextEdit which somehow supports multi-selection, but, of course, that is not what I need. I can post my code if necessary.

    1 Reply Last reply
    0
    • _ Offline
      _ Offline
      _DarkAngel_
      wrote on last edited by
      #2

      No ideas?

      It would be also fine to implement some mode in which it's possible to position the cursor at any point of the edit. I mean something like Borland Delphi's source code editor.

      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