Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT embedded and fonts
Forum Updated to NodeBB v4.3 + New Features

QT embedded and fonts

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 3 Posters 2.2k 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.
  • S Offline
    S Offline
    sirnoname
    wrote on last edited by
    #1

    Hi there,

    I am currently developing a QT5 embedded app on a ARM linux device (Toradex VF61).
    All working fine for first steps. A simple widget app will be shown.
    But the labels do have some small system font. I do not know which one. QT5 does not have makeqpf support or QConfig support, so I think freetype may be enabled and qpf also? No feature files are available.
    I have moved my ttf font to the resource of my app and load and set it to a label. On linux 64bit the app will set the resource font to my label. On arm embedded linux not (app compiled for arm).
    Did someone get a successfully way to set a font in QT5 embedded?

    I do not have the standard font directories and no fontdir on my arm device, I use resources.

    Best regards,
    SirNoname

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

      Hi,

      Are you using "QFontDatabase":http://doc.qt.io/qt-5/qfontdatabase.html to handle your custom font ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sirnoname
        wrote on last edited by
        #3

        yes, I do. Works fine if not QT embedded.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JCAndle
          wrote on last edited by
          #4

          use setPixelSize() instead of setPointSize().

          I am guessing you and I misconfigured something when we built Qt for the ARM and the fonts are not rendering as expected. I did this and all is exactly the way I want.

          I also had to hack QCustomPlot a bit for the same reason. If you will use plots, I recommend it and I can share the hac.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sirnoname
            wrote on last edited by
            #5

            Did get a result with QFileSystemModel.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sirnoname
              wrote on last edited by
              #6

              For a reason the Database do not work in QT Embedded.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                What type of font is it ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                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