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. Display a custom ellipsis when text is elided
Forum Updated to NodeBB v4.3 + New Features

Display a custom ellipsis when text is elided

Scheduled Pinned Locked Moved Unsolved General and Desktop
qstringelisionellipsis
3 Posts 2 Posters 669 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.
  • S Offline
    S Offline
    szumial
    wrote on last edited by
    #1

    Hi! I know there is a way to set the elide mode for a QString to display an ellipsis ("...") when there is not enough space to contain the entire length of the text. Is there a way to change the default ellipsis symbols displayed though? Based on my research so far, there is nothing in the framework to change it, but I might be wrong - do you know if there is a way to achieve that? I took a look at the Elided Label Example which does not answer my question.

    Chris KawaC 1 Reply Last reply
    0
    • S szumial

      Hi! I know there is a way to set the elide mode for a QString to display an ellipsis ("...") when there is not enough space to contain the entire length of the text. Is there a way to change the default ellipsis symbols displayed though? Based on my research so far, there is nothing in the framework to change it, but I might be wrong - do you know if there is a way to achieve that? I took a look at the Elided Label Example which does not answer my question.

      Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @szumial The text engine uses the ellipsis character from the unicode set (U+2026). If the font used doesn't have it the "..." text is used and it's hardcoded. So the only exposed way to customize it is to use a font with a custom ellipsis character.

      S 1 Reply Last reply
      1
      • Chris KawaC Chris Kawa

        @szumial The text engine uses the ellipsis character from the unicode set (U+2026). If the font used doesn't have it the "..." text is used and it's hardcoded. So the only exposed way to customize it is to use a font with a custom ellipsis character.

        S Offline
        S Offline
        szumial
        wrote on last edited by
        #3

        @Chris-Kawa Thanks for the quick reply! It might be helpful, I will think whether I can use it to my advantage.

        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