Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QML Text not rendered using custom build VS2015 Qt 5.6

    Installation and Deployment
    qml qt5.6 vs2015 text
    2
    3
    1682
    Loading More Posts
    • 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.
    • M
      mattytraxx last edited by

      When doing a custom build of Qt, the build of Qt and of my demo program (below) compile without errors. However, I've noticed that QML text doesn't render. Here is the test program:

      import QtQuick 2.3
      import QtQuick.Window 2.0
      
      Window {
          visible: true
      
          FontLoader { id: myCustomFont; source: "qrc:/arial.ttf" }
      
          Text {
              anchors.horizontalCenter: page.horizontalCenter
              text: qsTr("Hello World")
              font.family: myCustomFont.name
              anchors.centerIn: parent
      
              // if I comment this line out, the text is NOT dispalyed
              renderType: Text.NativeRendering // text IS displayed with this line
          }
      
          Rectangle {
              x: 10; y: 10
              width: 10; height: 10
              color: "red"
          }
      }
      

      As noted in the code, if I change the renderType to Text.NativeRendering, the text IS displayed. Note also that the rectangle is rendered without problems; in fact, I haven't seen any other graphics issues yet with my custom build. The Maroon demo that ships with Qt exhibits the same behavior--everything works fine, except the text is missing next to the fish and the star in the upper-right.

      I'm using Visual Studio 2015 and compiling Qt 5.6 from git:

      configure -opensource -platform win32-msvc2015 -opengl desktop
      

      Any ideas on how I can resolve this issue?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        Does it work with the 5.5 ?

        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 Reply Quote 0
        • M
          mattytraxx last edited by

          So as it turns out, compiling Qt 5.5 from git seems to solve this problem. I tried my demo program, as well as Maroon, and both display text by default (without having to set renderType to Text.NativeRendering).

          Dang it. That's what I get for trying a pre-release version. Thanks for the suggestion.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post