Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.5.1, 5.6.0
-
MacBookPro - Mac OS 10.11.4 - Qt 5.6.0 - QtCreator 3.6.1
Description
I used Loader to load some component asynchronously. It works great. But whenever I use FontLoader to load some embedded font, It brings asynchronously of Loader element and block UI thread a long time!
If FontLoader uses same system wide installed font using the name property, it seems to the Loader element works as expected or perhaps it works so fast.
This is my code:
import QtQuick 2.6 import QtQuick.Window 2.2 import QtGraphicalEffects 1.0 Window { id: win visible: true width: 300; height: 450 color: "#d8d8d8" Loader { asynchronous: true active: true anchors.fill: parent sourceComponent: Component { Item { id: wrapper2 anchors.fill: parent FontLoader { id: yekan_persianFont source: "qrc:/BYekan+.ttf" } DropShadow { id: rectShadow; anchors.fill: source horizontalOffset: 0; verticalOffset: 3; radius: 12.0; samples: 16; color: "#80000000"; smooth: true; source: wrapper; anchors.topMargin: 1.2 } Item { id: wrapper anchors.fill: parent Rectangle { anchors.fill: parent anchors.margins: 20 Text { text: "Salam" font { family: yekan_persianFont.name; pointSize: 20 } anchors.centerIn: parent } } } } } } }