I found the solution with some googling :
basically some of maya icons are compiled in ressources files,
so you won't be able to find the source files directly,
but you can extract them / use them with those functions
Hope it helps,
S
from PySide import QtGui, QtCore
test = QtGui.QWidget()
layout = QtGui.QHBoxLayout()
test.setLayout(layout)
test.show()
icon = QtGui.QIcon(":/cube.png")
button = QtGui.QToolButton()
button.setFixedSize(24,24)
button.setIcon(icon)
button.setIconSize(QtCore.QSize(20,20))
layout.addWidget(button)
How to know which bitmaps are available in Maya? Launch the Resource Browser
with this code
import maya.app.general.resourceBrowser as resourceBrowser
resBrowser = resourceBrowser.resourceBrowser()
path = resBrowser.run()
Le vendredi 16 mai 2014 09:56:06 UTC+2, ristjan a écrit :
> Hi,
>
>
> I need to create Maya shelves under a Qt-window/layout. I chose QListWidget
> in icon mode, since it fits my needs quite nicely.
>
>
> To display the icons, I need the pixmap files. The problem is that for some
> icons, the pixmap files can't be found under any of the paths in XBMLANGPATHs.
>
>
>
> For example the first button on 'General'-shelf has a pixmap called
> 'LearningMovies.png', but I can't find this file anywhere on my hard drive.
> Is there something really obvious that I'm missing here?
>
>
>
> Cheers,
> Risto
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/31317721-2c06-433a-8620-58e60c74a544%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.