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. Checkable list/check boxes in QTextEdit - PySide6
Forum Updated to NodeBB v4.3 + New Features

Checkable list/check boxes in QTextEdit - PySide6

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 248 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.
  • T Offline
    T Offline
    tIk90wT
    wrote on last edited by tIk90wT
    #1

    I've made a rich text editor and everything works great. Now I'm adding more functions to it like lists, which was done with QTextListFormat . But I'm yet to figure out how to implement a check list. It seems QTextList doesn't have something like that and cannot figure out how to implement it.

    Is there a way to insert markdown?

    Is it possible to add checkable list in QTextEdit?

    Thank You.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tIk90wT
      wrote on last edited by
      #2

      I tried taking the current html of the editor and and adding markdown code to it and set the new string to the editor as markdown. Something like the following:

      editor.setMarkdown(self.ed.toMarkdown() + "- [ ] check")
      

      This works as intended but obviously, processing the whole string every time you need check box is not efficient.

      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