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. [Wish] Add Rect over … when QLabel elision occurs to show all text in ToolTip.
Forum Updated to NodeBB v4.3 + New Features

[Wish] Add Rect over … when QLabel elision occurs to show all text in ToolTip.

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 291 Views
  • 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.
  • P Offline
    P Offline
    Phenom
    wrote on last edited by
    #1

    Hello,

    Can you add a Rect over … when text is elided in QLabel or other text layout?
    So when we click on this Rect a ToolTip appears with entire text.

    We already do something like this but with plain text in this project: RetroShare
    This is ElidedLabel

    jsulmJ 1 Reply Last reply
    1
    • P Phenom

      Hello,

      Can you add a Rect over … when text is elided in QLabel or other text layout?
      So when we click on this Rect a ToolTip appears with entire text.

      We already do something like this but with plain text in this project: RetroShare
      This is ElidedLabel

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Phenom said in [Wish] Add Rect over … when QLabel elision occurs to show all text in ToolTip.:

      So when we click on this Rect a ToolTip appears with entire text.

      You can use https://doc.qt.io/qt-5/qtooltip.html when user clicks on that area. What exactly is the problem?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • P Offline
        P Offline
        Phenom
        wrote on last edited by Phenom
        #3

        It's what we do.
        For the moment, we can only do that with plain Text as we paint Text with QTextLine.
        If this is include directly in QLabel (QTextDocumentLayout as I can read), we can use it with formatted Text.
        And this would respect StyleSheet and other...

        Look how this works when clicking in green elision rect:
        ElidedLabel.png

        Note: This doesn't change selection as it grabs mouse event.

        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