It only depends on 'six' I think it was called. Nothing huge. Easy to use and supporting colors, different sizes, etc.
Hey Roy
Thanks, it is good and i tested it and it worked.
but instead of importing PySide
we should import qtpy
, this will not cause problem later?
I'm using FontAwesome through QtAwesome and it's great. It's a package on Github and is just what I needed. I remember there being some extra dependencies to be both Py2 and Py3 compatible, but that was easy to remove (I only needed Py2).
It only depends on 'six' I think it was called. Nothing huge. Easy to use and supporting colors, different sizes, etc.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/aaa7d6b5-f0b8-464c-9f90-ceb7fd3638ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
hey man
thanks
i have this program as test:
#!/usr/bin/python
import sys
from PySide import QtCore, QtGui
# from qtpy import QtCore, QtGui
import qtawesome as qta
app = QtGui.QApplication(sys.argv)
fa_icon = qta.icon('fa.camera')
fa_button = QtGui.QPushButton(fa_icon, 'Camera')
fa_button.setIconSize(QtCore.QSize(32, 32))
fa_button.show()
sys.exit(app.exec_())
interesting thins is that it does not work on my system but in clean VM it works.
in bat file i set local packages, in local packages i have PySide and qtawesome
do you think i have some packages on my environment variables that conflict with local envs?
this is the error in my system:
Traceback (most recent call last):
File "E:\Madoodia\_GitHub\_ANR\Pipeline\_bin\..\pyside_samples\pyside_awesome_
simple.py", line 12, in <module>
fa_button = QtGui.QPushButton(fa_icon, 'Camera')
TypeError: 'PySide.QtGui.QPushButton' called with wrong argument types:
PySide.QtGui.QPushButton(QIcon, str)
Supported signatures:
PySide.QtGui.QPushButton(PySide.QtGui.QWidget = None)
PySide.QtGui.QPushButton(PySide.QtGui.QIcon, unicode, PySide.QtGui.QWidget = N
one)
PySide.QtGui.QPushButton(unicode, PySide.QtGui.QWidget = None)
I also removed that dependency and am just loading PySide. ;)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/94590e27-5c90-46a8-9a7b-9cc49fe7aa8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Not sure what's happening on your system.
label = u"label text"
Where the 'u' explicitly states that it should be a unicode object.
Funnily enough I can't remember seeing this particular issue before, and it's interesting it works in one of the two systems:
- Does it have same Python version?
- Are you enforcing future imports in one rof the two? (from __future__ import something) Something like that.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d24c72d0-a5ac-49b6-a8d3-2b59a842573a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
fa_icon = qta.icon('fa.camera')
returns QIcon?