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

Qt Quick Control 2 Tooltip can be way too big when you have newlines

    XMLWordPrintable

Details

    • Linux/X11, macOS, Windows
    • a063cd0be5e8f108a0084831856f4af8c0e9159c (qt/qtquickcontrols2/dev) a2b56c3661d76302e818864868e2dba656185b75 (qt/qtquickcontrols2/6.1) 10ede696d063de6bd7d3484bdfc8b83cb2ebdd68 (qt/tqtc-qtquickcontrols2/5.15)

    Description

      So I have a radio button declared like so:

       

      RadioButton {
                              text: "Stage IV"
                              ToolTip.visible: pressed
                              ToolTip.text: ">=5 mm CAL\n" +
                                            ">6mm probing depth\n" +
                                            ">33% Bone loss\n" +
                                            ">=3mm Vertical Bone loss\n" +
                                            "Complex Rehab needed\n" +
                                            ">5 teeth lost"
                          }
      

       When I tap or click on the radio button, it creates a tooltip that fills up a quarter of the screen. This is most likely due to the way that ToolTip tries to calculate its size based on the text and probably doesn't account for the newlines that I put in.

      This issue happens with the Material Theme

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-83630
          # Subject Branch Project Status CR V

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              tshah Tej Shah
              Votes:
              5 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes