<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[qmltocpp generator outputs undeclared &#x27;Bold&#x27; instead of &#x27;Qul::Private::Builtins::Font::Bold&#x27; in Qt for MCUs 2.11]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I’m using Qt for MCUs 2.11.</p>
<p dir="auto">in .qmlproject i enabled spark font engine and provided fmp file<br />
fontEngine: "Spark"<br />
defaultFontFamily: "Simple Symphonie"<br />
FontFiles {<br />
files:["fonts/SimpleSymphonie.fmp"]<br />
}</p>
<p dir="auto">below is my qml snippet</p>
<p dir="auto">Text {<br />
color: "#FFFFFF"<br />
text: qsTr("(%1%)").arg(btChargeLavel)<br />
font.pixelSize: Utils.sf(16)<br />
font.weight: Font.Bold<br />
horizontalAlignment: Text.AlignHCenter<br />
verticalAlignment: Text.AlignVCenter<br />
wrapMode: Text.NoWrap<br />
}</p>
<p dir="auto">However, the generated C++ (.cpp) contains:<br />
fontConfig_2.weight.setValue(Bold);</p>
<p dir="auto">This causes a build error:<br />
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<br />
C:/Users/Girish/Documents/TestApp/build/Qt_for_MCUs_2_11_Desktop_32bpp_MINGW-Debug/CMakeFiles/TestApp.dir/Header.cpp: In constructor 'Header::Header()':<br />
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<br />
1621 |     fontConfig_2.weight.setValue(Bold);<br />
|                                  ^~~~</p>
<p dir="auto">Expected output would be something like:<br />
fontConfig_2.weight.setValue(Qul::Private::Builtins::Font::Bold);</p>
<p dir="auto">is that problem of font class mapping  issue of fmp file?<br />
please provide solution for above problem</p>
<p dir="auto">Thankyou.</p>
]]></description><link>https://forum.qt.io/topic/163069/qmltocpp-generator-outputs-undeclared-bold-instead-of-qul-private-builtins-font-bold-in-qt-for-mcus-2.11</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 03:03:30 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/163069.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Aug 2025 10:03:39 GMT</pubDate><ttl>60</ttl></channel></rss>