QML Text not rendered using custom build VS2015 Qt 5.6
-
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
toText.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?
-
Hi and welcome to devnet,
Does it work with the 5.5 ?
-
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
toText.NativeRendering
).Dang it. That's what I get for trying a pre-release version. Thanks for the suggestion.