Is there a way to use qtawesome with enaml?

58 Views Asked by At

Is there a way to use Icons from qtawesome (https://github.com/spyder-ide/qtawesome/) within enaml?

1

There are 1 best solutions below

0
On BEST ANSWER

At the moment there is no clean way to do this, however you can use the following workaround:

from  enaml.widgets.api import Window, PushButton, Container
from enaml.icon import Icon

from qtawesome import icon as qicon

enamldef Main(Window):

    Container:

        PushButton:
            text = "Open"
            icon = Icon(_tkdata=qicon('fa.folder-open'))