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

Forums

OverviewFelgo 3 Support (Qt 5) › AppButton png image for icon

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #22530

    Jon-Paul

    Excuse me for being dumb but is there a built in mechanism to use your own .png as an AppButton’s icon? Or are you restricted to using IconTypes?

    #22532

    Alex
    Felgo Team

    Hi,

    there is no distinct base component for an image button. You can e.g. just but the image as child of an AppButton with custom minimumWidth and minimumHeight.

    Or you simply create an own QML component, depending on the desired appearance of the button.

    Cheers,
    Alex

    #22534

    Jon-Paul

    The main reason for asking this is I was trying to use the ‘crown’ icon (“\uf521”) but it doesn’t work. How can I find out which icons from FontAwesome are available?

    At the moment I’m just going to download the solid .ttf and try and use that.

    #22535

    Jon-Paul

    Thanks, sorry I posted over your reply. As long as I can get access to the FontAwesome fonts I need then there’s no real reason to use a customised AppButton

    #22536

    Alex
    Felgo Team

    Hi,

    the crown icon is only part of font awesome 5, the default icon font uses version 4. You can replace the icon font globally like this:

    App {
    
      onInitTheme: {
        Theme.iconFont = iconFont
      }
    
      FontLoader{
        id: iconFont
        source: "../path/to/your/font/fa-light-300.ttf"
      }
    }

    Then you can use the icons with their unicode, like “\uf521”

    Cheers,
    Alex

    #22537

    Jon-Paul

    Cheers, that’s just what I was trying out.

    #22538

    Jon-Paul

    Working perfectly, thanks.

    Out of interest, where does it state the version of FontAwesome that is used and are there any plans to update it?

    #22539

    Alex
    Felgo Team

    Hm I think it is only mentioned at some point in the changelog. We are discussing it, but since FontAwesome is now split into a free and a paid part we have not yet decided and fully checked if any migration issues might occur.

    Anyway, we made sure exchanging the icon font is easy, so this is no pressing issue.

    Cheers,
    Alex

Viewing 8 posts - 1 through 8 (of 8 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