Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QtQuick Application text font disappear

QtQuick Application text font disappear

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 170 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.
  • C Offline
    C Offline
    cb__
    wrote on last edited by
    #1

    Hi,
    I am a QtQuick Developer, The application I developed has a small chance of the font disappearing after the computer is restarted.
    企业微信截图_17194825552894.png

    I use the FontLoader component to load the fonts I want to use in the qml file.I want to know what causes this issue.
    Here is a simple code example:

    Window {
            id: mainWindow
    
            FontLoader {
                id: fontAliPuhuiRegular
                source:  "qrc:font/Alibaba-PuHuiTi-Regular.ttf"
            }
    
            Text {
                font {
                    family: fontAliPuhuiMedium.name
                    styleName: "Medium"
                    pixelSize: 14
                }
                verticalAlignment: Text.AlignVCenter
                color: "#FFFFFF"
                text: qsTr("test")
            }
    }
    
    

    Qt Version: 5.15.2 + msvc
    System: Windows 10

    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