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

QToolTip Fails to Resize Vertically in some cases when rich text is used

    XMLWordPrintable

Details

    Description

      It is possible to get the QToolTip to show without resizing properly vertically.
      This problem on happens with rich text, and it requires some trial and error to get the tooltip to show in this state.

      The tool tip is normally shown on multiple lines, when moving the mouse cursor back and forth between two buttons with tool tip
      it is possible to get the multiline richtext tooltip to show up on one long line.

      Reproducible in Qt 4.4 by modifying the examples/widgets/tooltips example in sortingbox.cpp and replace the following function with:
      QToolButton *SortingBox::createToolButton(const QString &toolTip,
      const QIcon &icon, const char
      *member)
      {
      QToolButton *button = new QToolButton(this);
      static int a=0;
      if (a == 0)

      { button->setToolTip( "<p>Enter a time to jump to. Relative times begin " "with a <b>+</b> or <b>-</b> followed by an offset " "value. By default, offset values are in seconds; " "append <b>m</b> or <b>h</b> to indicate minutes " "or hours. For absolute times, enter the time in " "<b>HH:MM:SS</b> format.</p>" ); }

      else

      { button->setToolTip(toolTip); }

      a++;

      // button->setToolTip(toolTip);
      button->setIcon(icon);
      button->setIconSize(QSize(32, 32));
      connect(button, SIGNAL(clicked()), this, member);

      return button;
      }

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            admin Administrator
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes