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

Tooltip rich text editor generates platform-specific HTML code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.0
    • 4.6.2, 4.7.0
    • Tools: Designer
    • None
    • Microsoft Windows XP Professional SP3 (created tooltip on this platform)
      GNU/Linux 64-bit
      Mac OS X 10.4 Intel
    • 08a9924cc69e0c44aae1abfd8500cd62f6e3d73a

    Description

      Tooltips created using the rich text editor generate platform-specific HTML code.

      Writing "Test" in the tooltip rich text editor generates the following on Windows:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
      <html><head><meta name="qrichtext" content="1" /><style type="text/css">
      p, li { white-space: pre-wrap; }
      </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Test</p></body></html>
      

      The font-family used is platform specific and doesn't use the native font if run on a different platform.
      The font-size is also platform specific. During my testing if I show the tooltip on Mac it shows up as very tiny text as the default font size on Mac is much larger. Perhaps some preset sizes like xx-small, x-small, small, medium, large, x-large, xx-large or percentages should be added relative to the default font size?

      To get my tooltips to show as expected for all platforms I have to manually clean up the HTML code whenever I change something in the rich text editor.

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            net147 Jonathan Liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes