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. Statically-linked application doesn't show any text

Statically-linked application doesn't show any text

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 1.4k Views 2 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.
  • D Offline
    D Offline
    Daniel Williams
    wrote on last edited by
    #1

    I have a Qt widgets application that runs perfectly when run with the installed Qt (5.12.4). I followed the instructions to make it a statically-linked application so I can deploy it to another computer. When I first ran it, I didn't see any text in the appliaction and I saw errors in the logs about fonts not being available. I installed the dejavu fonts to ~/Qt-5124/lib/fonts. Now, I don't get any errors in the logs, but I still don't see the text. I'm wondering if it's a font issue. The font that is being uses is "Ubuntu." I believe that is a system font. Should the application be able to display system fonts?

    0_1561577753834_GoodImage.PNG 0_1561577760091_BadImage.PNG

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

      Hi,

      Check with QFontDatabase what font you have access to and if the one you want to use loads properly.

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

      D 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        Check with QFontDatabase what font you have access to and if the one you want to use loads properly.

        D Offline
        D Offline
        Daniel Williams
        wrote on last edited by
        #3

        @SGaist I addded a function at the beginning to "qDebug()" the list of fonts from QFontDatabase.

        When I run interactively with plugin support, I see that I have access to a whole bunch of fonts. When I run as a statically-linked application, I see that I have zero fonts available.

        I looked at the config.summary of my static build of Qt. It showed that fontconfig was not enabled. I thought I'd try to enable it by adding a switch to the configure command, "-fontconfig." But I received additional errors:

        ../Qt/5.12.4/Src/configure -static -prefix ~/qt-5124 -system-xcb -recheck-all -system-fontconfig

        ERROR: Feature 'fontconfig' was enabled, but the pre-condition '!config.msvc && features.system-freetype && libs.fontconfig' failed.

        I'm running on an ubuntu VM.

        Do you know how to enable system fonts in the static build?

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

          Add the fontconfig development package to your system.

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

          D 1 Reply Last reply
          2
          • SGaistS SGaist

            Add the fontconfig development package to your system.

            D Offline
            D Offline
            Daniel Williams
            wrote on last edited by
            #5

            @SGaist I tried apt-get install fontconfig-dev and received an error that the package doesn't exist. I tried apt-cache search fontconfig. I didn't see anything like a development package for fontconfig. Do you know how to install it?

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

              What about libfontconfig1-dev ?

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

              D 1 Reply Last reply
              2
              • SGaistS SGaist

                What about libfontconfig1-dev ?

                D Offline
                D Offline
                Daniel Williams
                wrote on last edited by
                #7

                @SGaist said in Statically-linked application doesn't show any text:

                libfontconfig1-dev

                That looks like the solution. Thank you.

                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