Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Specifying QFont.families in QML?

Specifying QFont.families in QML?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 765 Views
  • 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.
  • T Offline
    T Offline
    thomthom
    wrote on last edited by
    #1

    QFont has families to provide with a set of fonts to choose from:
    https://doc.qt.io/qt-5/qfont.html#setFamilies

    There is also the font style hint that would allow the font matching to prefer a certain type of fonts: https://doc.qt.io/qt-5/qfont.html#StyleHint-enum

    I'm looking to provide font preferences for Windows and Mac, monospace fonts. What's the canonical way to provide a list of preferred fonts in QML?

    Is there something like in CSS? families looked to be doing that.
    But also a generic name, like monospace if all preferred are missing?

    The QML font docs didn't quite show me what I was hoping to find. But I've found that there's often more available to QML than what I manage to figure out from the docs.
    https://doc.qt.io/qt-5/qml-font.html#details
    Should all QFont properties be available to QML?

    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