Hi Chris, and welcome to the mailing list! Would assigning the PNG directly to your QPushButton work for you?
from Qt import QtWidgets, QtGui, QtCore button = QtWidgets.QPushButton() pixmap = QtGui.QPixmap(r"c:\users\manima\Desktop\syrian.png") button.setIcon(pixmap) button.setIconSize(QtCore.QSize(100, 100)) button.show() [image: image.png] - http://www.ecstudents.net/12springb4/erinvl/pics/syrian.png On Tue, 7 May 2019 at 04:18, Chris C <kurikuri0...@gmail.com> wrote: > Hi all, > > I have started a small project to learn more about python and programming. > Total beginner but just thought i give it a shot and get help from this > group. > > > I have created a material library interface just using python within maya. > Just like the image below. > > I am trying to find a way to search for PNG thumbnails specified by the > material library path and add those PNG files in the Grid Layout separating > them into categories as listed in the file explorer and also in the > interface. > > > I have used just a normal button as a test and placeholder for the PNG > images. > > I had a look at many examples and tried but i cannot seem to get it to > work. If anyone has ideas or can share their knowledge would be a great > help. > > > > [image: matLibBrowser.jpg] > > > > > -- > 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_maya+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/04c2a800-9669-46e3-b7ec-fa575059c5b8%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/04c2a800-9669-46e3-b7ec-fa575059c5b8%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOB9gT6Ec6kT-6hYkKCvGdy_qX9%2BaWsr7S9TrXgxvgcNwA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.