Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-95104

Tooltip bounding box larger than necessary when text contains return carriage

    XMLWordPrintable

Details

    • Windows

    Description

      Attached the sample code. Pressing the button in the new created window will show the tooltip

      Workaround is to use a standalone tooltip item and reset its contentWidth/Height according to the text size

      ToolTip {
      visible: parent.pressed
      text: "Tool tip<br>width test"
      Text{
      visible: false
      id:a
      text: "Tool tip<br>width test"
      }
      contentHeight: a.implicitHeight
      contentWidth: a.implicitWidth
      delay:500
      }
      

      Attachments

        1. qtbug-95104.zip
          99 kB
          Yi Fei
        2. Screenshot 2021-07-12 at 12.40.42.png
          53 kB
          Volker Hilsheimer

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              yifei Yi Fei (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes