本文整理汇总了Python中PySide.QtGui.QIcon.pixmap方法的典型用法代码示例。如果您正苦于以下问题:Python QIcon.pixmap方法的具体用法?Python QIcon.pixmap怎么用?Python QIcon.pixmap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QIcon
的用法示例。
在下文中一共展示了QIcon.pixmap方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setIconModes
# 需要导入模块: from PySide.QtGui import QIcon [as 别名]
# 或者: from PySide.QtGui.QIcon import pixmap [as 别名]
def setIconModes(self):
myIcon1 = QIcon( self.icon)
myLabel1 = QLabel('sample', self)
pixmap1 = myIcon1.pixmap(50, 50, QIcon.Active, QIcon.On)
myLabel1.setPixmap(pixmap1)
myIcon2 = QIcon( self.icon)
myLabel2 = QLabel('sample', self)
pixmap2 = myIcon2.pixmap(50, 50, QIcon.Disabled, QIcon.Off)
myLabel2.setPixmap(pixmap2)
myLabel2.move(50, 0)
myIcon3 = QIcon( self.icon)
myLabel3 = QLabel('sample', self)
pixmap3 = myIcon3.pixmap(50, 50, QIcon.Selected, QIcon.On)
myLabel3.setPixmap(pixmap3)
myLabel3.move(100, 0)
示例2: setIconModes
# 需要导入模块: from PySide.QtGui import QIcon [as 别名]
# 或者: from PySide.QtGui.QIcon import pixmap [as 别名]
def setIconModes(self):
myIcon1 = QIcon('iconos/prueba.png')
myLabel1 = QLabel('sample', self)
pixmap1 = myIcon1.pixmap(50, 50, QIcon.Active, QIcon.On)
myLabel1.setPixmap(pixmap1)
myLabel1.setToolTip('Active Icon')
myIcon2 = QIcon('iconos/prueba.png')
myLabel2 = QLabel('sample', self)
pixmap2 = myIcon2.pixmap(50, 50, QIcon.Disabled, QIcon.Off)
myLabel2.setPixmap(pixmap2)
myLabel2.move(50, 0)
myLabel2.setToolTip('Disabled Icon')
myIcon3 = QIcon('iconos/prueba.png')
myLabel3 = QLabel('sample', self)
pixmap3 = myIcon3.pixmap(50, 50, QIcon.Selected, QIcon.On)
myLabel3.setPixmap(pixmap3)
myLabel3.move(100, 0)
myLabel3.setToolTip('Selected Icon')
示例3: ponerImagen
# 需要导入模块: from PySide.QtGui import QIcon [as 别名]
# 或者: from PySide.QtGui.QIcon import pixmap [as 别名]
def ponerImagen(self, img):
Imagen = QIcon(img)
Label = QLabel(os.path.basename(img), self)
pixmapImagen = Imagen.pixmap(50,50)
Label.setPixmap(pixmapImagen)
self.ponerIcono(img)
示例4: testQIconCtorWithNone
# 需要导入模块: from PySide.QtGui import QIcon [as 别名]
# 或者: from PySide.QtGui.QIcon import pixmap [as 别名]
def testQIconCtorWithNone(self):
icon = QIcon(None)
pixmap = icon.pixmap(48, 48)
self.app.exec_()