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. Change font address
Forum Updated to NodeBB v4.3 + New Features

Change font address

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.9k 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.
  • K Offline
    K Offline
    kitten
    wrote on last edited by
    #1

    hi how are you?
    i have qwebview widget on my application ,it doesn't show my text correctly
    now i want to make it to use a specefic font that i get him address
    or how can i add this font to my font list of application to use it
    how can i do that?

    www.kitten.mihanblog.com

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Ramblurr
      wrote on last edited by
      #2

      You have two options:

      1. Use QWebSettings and specify the font in C# ++

      Example:

      @QWebSettings* websettings = QWebSettings::globalSettings();
      websettings->setFontFamily(QWebSettings::StandardFont, font.family());@

      Don't forget to run that before instantiating the QWebView.

      1. Use HTML 5's web font feature + CSS. In the <head></head> section of your page put the following:

      @
      <link href='http://fonts.googleapis.com/css?family=Allerta' rel='stylesheet' type='text/css' />
      @

      Then you can use the font in your CSS. You can of course change the font to your own, as long as you have a URL for it. I included one of Google's fonts just as an example.

      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