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. List of available fonts
Qt 6.11 is out! See what's new in the release blog

List of available fonts

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 12.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.
  • P Offline
    P Offline
    PythonQTMarlem
    wrote on last edited by
    #1

    Hello,

    I would like to read all available fonts of an operating system into a QComboBox. How does it work?

    JonBJ 1 Reply Last reply
    0
    • P PythonQTMarlem

      Hello,

      I would like to read all available fonts of an operating system into a QComboBox. How does it work?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @PythonQTMarlem
      See https://doc.qt.io/qt-5/qfontdatabase.html#families

      1 Reply Last reply
      1
      • P Offline
        P Offline
        PythonQTMarlem
        wrote on last edited by
        #3

        Thank you

        1 Reply Last reply
        0
        • P Offline
          P Offline
          PythonQTMarlem
          wrote on last edited by
          #4

          I'm Python Fresh

          I don't find out how to do it. Can you please give an example?

          JonBJ 1 Reply Last reply
          0
          • P PythonQTMarlem

            I'm Python Fresh

            I don't find out how to do it. Can you please give an example?

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @PythonQTMarlem
            Seriously? I expect you to be able to figure this out, whether you are "Python Fresh" or not, there is even an example at https://doc.qt.io/qt-5/qfontdatabase.html#details....

            fonts = QFontDatabase()
            names = fonts.families()
            
            1 Reply Last reply
            2
            • P Offline
              P Offline
              PythonQTMarlem
              wrote on last edited by
              #6

              @JonB said in List of available fonts:

              fonts = QFontDatabase()
              names = fonts.families()

              Oh I am sorry. You are right, it was very simple. thank you!

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SimonSchroeder
                wrote on last edited by
                #7

                Even easier: You can use a QFontComboBox directly.

                1 Reply Last reply
                2

                • Login

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