gamecreature / QtAwesome

QtAwesome - Font Awesome for Qt Applications
Other
773 stars 147 forks source link

Add qml support #35

Open demiantres opened 5 years ago

demiantres commented 5 years ago

Add support for using the library from Qml, for instance (Font Awesome 5 branch):

`{ Q_OBJECT Q_ENUMS(FontStyle)

public: enum FontStyle { /// solid icons Stfas = style::stfas, /// regular icons Stfar = style::stfar,

ifdef FONT_AWESOME_PRO

    /// light icons
    Stfal = style::stfal,
    /// duotone icons
    Stfad = style::stfad,

endif

    /// brands icons
    Stfab = style::stfab
};

Q_INVOKABLE QString getFontName(FontStyle fontStyle = Stfas) const;
Q_INVOKABLE QString getIcon(const QString &iconName, FontStyle fontStyle = Stfas) const;`
nuttyartist commented 1 year ago

👍

gamecreature commented 1 year ago

More info about this: https://doc.qt.io/qt-6/qtqml-tutorials-extending-qml-example.html

gamecreature commented 10 months ago

In don't use QML myself. If somebody can build in support for it and write a QML sample app, I can try to integrate it into the project.