Forums

OverviewFelgo 2 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support