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. @font-face in QtStyle or embeeded fonts
Forum Updated to NodeBB v4.3 + New Features

@font-face in QtStyle or embeeded fonts

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 309 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.
  • Artemis21A Offline
    Artemis21A Offline
    Artemis21
    wrote on last edited by
    #1

    Hi,
    I'm customizing an app that supports Qt CSS, I've actually changed some font inside the app with font-family, but this obviously works only if the font is already installed in the machine. Is it possible to use an external font like google fonts via @font-face, or some font in the same directory of the .css? so that the font installation is not needed?

    Thank you

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      As far as i know its not possible with stylesheets.
      You can load fonts from resource file/folder with Qt but
      it takes code
      QFontDatabase::addApplicationFont(":/fonts/monospace.ttf");

      I have never seen anything that allows this directly in stylesheets.

      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