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 size appears really small when switching from Qt 5.12 to Qt 5.15
Forum Updated to NodeBB v4.3 + New Features

Font size appears really small when switching from Qt 5.12 to Qt 5.15

Scheduled Pinned Locked Moved Unsolved General and Desktop
font
4 Posts 3 Posters 1.1k Views
  • 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.
  • A Offline
    A Offline
    Andy1
    wrote on last edited by
    #1

    We've been encountering an error where the font size for numbers is super tiny in a version of our software compiled with Qt 5.15.2. With a previous version compiled with Qt 5.12, the numbers show up with the correct size. Since we didn't change any of the code in that area, we were wondering if anyone else had a similar issue to this and, if so, if they have a workaround for it.

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You should take a look at Qt::AA_EnableHighDpiScaling and friends.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Andy1
        wrote on last edited by
        #3

        Thanks for the response!

        We think Qt is not finding the exact font that we are trying to use on the system and going with the closest match. Is there a way to tell the exact font that it is using?

        1 Reply Last reply
        0
        • JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by
          #4

          something like this. Try it out
          QFont font("Courier New");
          font.setStyleHint(QFont::Monospace);
          QApplication::setFont(font); or
          QCoreApplication::setFont(font);

          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