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. QCheckBox in a QTextEdit
Qt 6.11 is out! See what's new in the release blog

QCheckBox in a QTextEdit

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 3.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.
  • N Offline
    N Offline
    nbortola
    wrote on last edited by
    #1

    Hello,how can I put in my QTextEdit a QCheckBox?is it possible?

    Thank you for a reply,Nicola.

    [EDIT: more meaningful topic, Volker]

    1 Reply Last reply
    0
    • M Offline
      M Offline
      marko-a
      wrote on last edited by
      #2

      Could you give us a few more details? How is this custom component supposed to look and react to user input? As far as I can tell you're looking for a text-input component that has check-box on left/right side? Why not simply align QTextEdit with a QCheckBox and remove label from check-box? Based on your specific requirements you may decide to compose a custom component out of those two standard components.

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nbortola
        wrote on last edited by
        #3

        I got to create a sort of "add Friend",I have x line with a text in my TextEdit and i would to put x CheckBox (one for line). (for me this is the simple solution)

        For example:
        aaaa CheckBox
        bbbb CheckBox
        cccc CheckBox
        ...

        I only know the TextEdit,but I think there are a best solution for this problem.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          So... why are you using a QTextEdit here? For displaying a list, there are far "better":http://doc.qt.nokia.com/4.7/qlistview.html "solutions":http://doc.qt.nokia.com/4.7/qlistwidget.html in Qt. Those make it easy to add a checkbox as well.

          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