Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for MCUs
  4. qmltocpp generator outputs undeclared 'Bold' instead of 'Qul::Private::Builtins::Font::Bold' in Qt for MCUs 2.11

qmltocpp generator outputs undeclared 'Bold' instead of 'Qul::Private::Builtins::Font::Bold' in Qt for MCUs 2.11

Scheduled Pinned Locked Moved Unsolved Qt for MCUs
1 Posts 1 Posters 3.2k 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.
  • G Offline
    G Offline
    Girishsonar88
    wrote on last edited by
    #1

    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 problem

    Thankyou.

    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