qmltocpp generator outputs undeclared 'Bold' instead of 'Qul::Private::Builtins::Font::Bold' in Qt for MCUs 2.11
-
Hi,
I’m using Qt for MCUs 2.11.in .qmlproject i enabled spark font engine and provided fmp file
fontEngine: "Spark"
defaultFontFamily: "Simple Symphonie"
FontFiles {
files:["fonts/SimpleSymphonie.fmp"]
}below is my qml snippet
Text {
color: "#FFFFFF"
text: qsTr("(%1%)").arg(btChargeLavel)
font.pixelSize: Utils.sf(16)
font.weight: Font.Bold
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.NoWrap
}However, the generated C++ (.cpp) contains:
fontConfig_2.weight.setValue(Bold);This causes a build error:
C:\Users\Girish\Documents\TestApp\build\Qt_for_MCUs_2_11_Desktop_32bpp_MINGW-Debug\CMakeFiles\TestApp.dir\Header.cpp:1621: error: 'Bold' was not declared in this scope
C:/Users/Girish/Documents/TestApp/build/Qt_for_MCUs_2_11_Desktop_32bpp_MINGW-Debug/CMakeFiles/TestApp.dir/Header.cpp: In constructor 'Header::Header()':
C:/Users/Girish/Documents/TestApp/build/Qt_for_MCUs_2_11_Desktop_32bpp_MINGW-Debug/CMakeFiles/TestApp.dir/Header.cpp:1621:34: error: 'Bold' was not declared in this scope
1621 | fontConfig_2.weight.setValue(Bold);
| ^~~~Expected output would be something like:
fontConfig_2.weight.setValue(Qul::Private::Builtins::Font::Bold);is that problem of font class mapping issue of fmp file?
please provide solution for above problemThankyou.