Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QML Text not rendered using custom build VS2015 Qt 5.6
Forum Updated to NodeBB v4.3 + New Features

QML Text not rendered using custom build VS2015 Qt 5.6

Scheduled Pinned Locked Moved Installation and Deployment
qmlqt5.6vs2015text
3 Posts 2 Posters 2.1k 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.
  • M Offline
    M Offline
    mattytraxx
    wrote on 7 Sept 2015, 22:57 last edited by
    #1

    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
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 8 Sept 2015, 19:17 last edited by
      #2

      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
      0
      • M Offline
        M Offline
        mattytraxx
        wrote on 11 Sept 2015, 06:59 last edited by
        #3

        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
        0

        2/3

        8 Sept 2015, 19:17

        • Login

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