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. Cross platform font for QFontComboBox
Forum Updated to NodeBB v4.3 + New Features

Cross platform font for QFontComboBox

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 302 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.
  • E Offline
    E Offline
    enne9
    wrote on last edited by
    #1

    Hello,
    I have a QFontComboBox and I'd like to have the same list of compatible fonts on all platforms (in particular macOS and Windows).
    Any idea that doesn't involve manual checks for compatibility and imports? Thanks

    1 Reply Last reply
    0
    • E Offline
      E Offline
      enne9
      wrote on last edited by
      #2

      As a workaround, I want to remove all the installed fonts and add some custom ones.
      I'm able to add new ones but not to remove the initial ones. To do that I'm using:

      QFontDatabase::removeAllApplicationFonts();
      

      It seems like it can only be used to remove the custom added fonts but not the initial system fonts.
      Are there other approaches to do that?

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

        Hi
        In what way compatible ?
        there is
        https://doc.qt.io/qt-5/qfontcombobox.html#FontFilter-enum
        but its not clear which fonts you actually wants.

        1 Reply Last reply
        0
        • E Offline
          E Offline
          enne9
          wrote on last edited by
          #4

          Found a solution, I just installed some custom fonts and displayed only them in the QFontComboBox.
          Thanks anyway!

          1 Reply Last reply
          1

          • Login

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