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. How to set QTextEdit text stylesheet like this?
Forum Updated to NodeBB v4.3 + New Features

How to set QTextEdit text stylesheet like this?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 1.1k Views 2 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
    Masonsu
    wrote on last edited by A Former User
    #1

    alt text
    hello, everyone. I want to set QTextEdit text like this,I mean the bubble of the text, since I have already set alignment ,how can I achieve this , use stylesheet? can you give some advice?
    Thanks

    A 1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Honestly I do not think that's a QTextEdit, it's probably a QListView + a model

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Next time, I'd recommend checking what is said in the conversation before posting an excerpt ;)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        3
        • M Masonsu

          alt text
          hello, everyone. I want to set QTextEdit text like this,I mean the bubble of the text, since I have already set alignment ,how can I achieve this , use stylesheet? can you give some advice?
          Thanks

          A Offline
          A Offline
          ambershark
          wrote on last edited by
          #4

          @Masonsu Definitely not doing that with a QTextEdit.. You will need a custom widget or as mentioned by VRonin you can try using views (QTreeView/QListView) and custom QItemDelegates.

          @SGaist LOL! I don't speak french but I had to google translate that after you said that. :)

          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

          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