Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business


OverviewFelgo 3 Support (Qt 5) › sp() and dp() function not accessible


Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #8438


    I need to scale text via font.pixelSize; The Docs say i should use the sp() function, but the example does not work. Here’s the code.

    import Felgo 3.0
    import QtQuick 2.0
    GameWindow {
      id: gameWindow
      Rectangle {
        width: parent.width
        height: gameWindow.dp(48)
        Text {
          text: "20sp"
          font.pixelSize: gameWindow.sp(20)

    Any workaround?




    Felgo Team

    Hi Jan,

    please update your SDK first to the latest version 2.2.0 – the density-independence functions were added there (see changelog).

    As mentioned in the density independence blog post, we generally recommend just using a Scene and GameWindow with the content scaling approach, especially for games. For apps that is different though – the density independent approach is better there..

    Cheers, Chris


Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded