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

Generate CSS compatible string from QFont

    XMLWordPrintable

Details

    Description

      Then the user could choose a QFont using a QFontDialog, and the font could be used a call to setStyleSheet(), similar to QColor.

      Doing something like this does not work:

      setStyleSheet("font-family: " + QFont::family() + "; font-size: " + QFont::pixelSize() + "px; font-style: " + QFont::style + "; font-weight: " + QFont::weight() + ";"

      as Qt uses a weighting scale from 0 to 99 (similar to, but not the same as, the scales used in Windows or CSS).

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            vhilshei Volker Hilsheimer
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes