python - PyQt use QStyle.StandardPixmap with QIcon -
i using pyqt4 , want replace displayed icon in tree view:
if typeinfo == "light": return qtgui.qicon(qtgui.qpixmap(":/light.png")) i use pyqt standard pixmap items (here), like:
if typeinfo == "light": return qtgui.qstyle.sp_dirclosedicon but icon not displayed.
the documentation linked leads answer:
return qtgui.qapp.style().standardicon(qtgui.qstyle.sp_dirclosedicon)
Comments
Post a Comment