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 a structured text editor in Qt
Forum Updated to NodeBB v4.3 + New Features

Implementing a structured text editor in Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 168 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.
  • M Offline
    M Offline
    Matt Chaput
    wrote on 30 May 2019, 19:13 last edited by
    #1

    Hi all,

    I'm hoping to write a structured documentation editor using QTextEdit/QTextDocument. Unfortunately, this is one area where the normally stellar Qt docs can be a bit thin, so I'm hoping y'all can help me out with some things.

    • I need text blocks to remember what "type" they are, and a given type will always have the same block format. Changing the type changes the format, and the format is only ever driven by the type. Should I just store the type as a property, and manage the code to always try to set the appropriate format at the same time as the block type? Or can/should I generate my own QTextBlock objects (from createObject()) that can just point to the type's shared format?

    • Where can I add drawing code to "decorate" blocks/frames with extra information? (For example, I might want to display the block type in the margin next to each block.)

    • Is there a convenient place I could hook into to display interactive widgets around blocks as the user edits them?

    • How can I control rendering of bullet/numbered list styles? I want to draw the bullet at the start of the indent, not the end, so the left margins of blocks at the same level line up, and control the drawing of bullets.

    Thanks in advance for any help you can give!

    1 Reply Last reply
    1

    1/1

    30 May 2019, 19:13

    • Login

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