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. MacOS and MS Shell Dlg 2
QtWS25 Last Chance

MacOS and MS Shell Dlg 2

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 663 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.
  • P Offline
    P Offline
    Perdrix
    wrote on 19 Feb 2025, 16:15 last edited by
    #1

    Building and running on MacOS:

    I get this at run time:

    Qt Warn: (:0) Populating font family aliases took 139 ms. Replace uses of missing font family "MS Shell Dlg 2" with one that exists to avoid this cost.

    Why?
    David

    1 Reply Last reply
    0
    • A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 19 Feb 2025, 17:39 last edited by
      #2

      I asked perplexity.ai for you. She said:
      """
      This warning occurs when a Qt application tries to use a font family that is not available on the system, resulting in a delay as Qt searches for a substitute. To resolve this issue, you can:

      1. Specify an Existing Font: Replace the missing font ("MS Shell Dlg 2") with one that exists on your system using QFont::setFamily(). For example:

        QFont font;
        font.setFamily("Arial"); // Replace with a commonly available font
        QApplication::setFont(font);
        
      2. Add Font Substitutions: Use QFontDatabase::addApplicationFont() to load custom fonts or QFont::insertSubstitution() to define substitutes for missing fonts[2][5][8].

      3. Initialize Fonts Early: Set the desired font in the QApplication constructor to avoid delays during runtime[4].

      4. Check System Fonts: Ensure that the required fonts are installed on your system. If not, install them or modify the application to use available fonts[7].

      These steps should eliminate the warning and improve performance.

      Citations:
      [1] https://forum.freecad.org/viewtopic.php?t=86309
      [2] https://doc.qt.io/qt-6/qfont.html
      [3] https://bugs.dolphin-emu.org/issues/12035
      [4] https://forum.qt.io/topic/119302/missing-font-family-warning-on-macos
      [5] https://ftp.nmr.mgh.harvard.edu/pub/dist/freesurfer/tutorial_versions/freesurfer/lib/qt/qt_doc/html/qfont.html
      [6] https://www.qt.io/blog/text-improvements-in-qt-6.7
      [7] https://gitlab.kitware.com/paraview/paraview/-/issues/20278
      [8] http://osr600doc.xinuos.com/en/SDK_qt3/qfont.html
      [9] https://dreamswork.github.io/qt4/classQFont.html


      Antwort von Perplexity: https://www.perplexity.ai/search/qt-warn-0-populating-font-fami-lIbFHxT3ShW45OSjAcG0Ow?utm_source=copy_output
      """

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Perdrix
        wrote on 19 Feb 2025, 19:00 last edited by
        #3

        But, but I don't specify that font anywhere

        I 1 Reply Last reply 19 Feb 2025, 20:34
        0
        • A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 19 Feb 2025, 19:40 last edited by
          #4

          You should double check, and otherwise you need to tell us more about your app and environment.

          Qt has to stay free or it will die.

          1 Reply Last reply
          0
          • P Perdrix
            19 Feb 2025, 19:00

            But, but I don't specify that font anywhere

            I Offline
            I Offline
            IgKh
            wrote on 19 Feb 2025, 20:34 last edited by
            #5

            @Perdrix something in your application is trying to create a QFont with this font family name, this isn't smoke without fire. Maybe it is a 3rd party library. More likely - since this font family isn't real but is a "magic name" that Windows uses to refer to the current UI font. it could indicate some sort of cross contamination between the Windows and macOS versions of your app or in your environment. Perhaps it is some settings you copied from Windows to Mac? Or a HTML that you exported from a Windows version and tried to import to the Mac version?

            1 Reply Last reply
            1
            • P Offline
              P Offline
              Perdrix
              wrote on 20 Feb 2025, 15:51 last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • P Offline
                P Offline
                Perdrix
                wrote on 20 Feb 2025, 15:53 last edited by
                #7

                Grrr foundit in a ui file - excuse me while I shoot the developer (no not I).

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  Perdrix
                  wrote on 20 Feb 2025, 16:10 last edited by
                  #8

                  I also found Segoe UI as well as MS Shell Dlg 2 both of which are windows specific. What should I use to replace these?

                  I 1 Reply Last reply 22 Feb 2025, 15:38
                  0
                  • P Perdrix
                    20 Feb 2025, 16:10

                    I also found Segoe UI as well as MS Shell Dlg 2 both of which are windows specific. What should I use to replace these?

                    I Offline
                    I Offline
                    IgKh
                    wrote on 22 Feb 2025, 15:38 last edited by
                    #9

                    @Perdrix Nothing, normally. Elements that need to use the UI font should be allowed to fall back to the application default font.

                    1 Reply Last reply
                    0

                    1/9

                    19 Feb 2025, 16:15

                    • Login

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