Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to find out which CSS generic font-family a QFont belongs to?
Forum Updated to NodeBB v4.3 + New Features

How to find out which CSS generic font-family a QFont belongs to?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stephenju
    wrote on last edited by
    #1

    Given a QFont object, how can I find out if it's a serif, sans-serif, or monospace font?

    QFont::styleHint() only returns the hint set specifically to the font. It doesn't work with font selected with the font panel for example.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Phil Weinstein
      wrote on last edited by
      #2

      Stephen, did you ever find a way to do this?

      That's the main deficiency of basic QFont / CSS Font specification encoding/decoding functions I devised and shared. See this thread: QFont support for CSS Font spec encoding? ... http://qt-project.org/forums/viewthread/47421/

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved