1. thijsdezoete
  2. appindicators

Commits

thijsdezoete  committed 2f7efe1

pixmaps for png

  • Participants
  • Parent commits de2f80f
  • Branches master

Comments (0)

Files changed (1)

File test.py

View file
 from PyQt4 import QtCore, QtGui, QtSvg
 
 app = QtGui.QApplication([])
-
 i = QtGui.QSystemTrayIcon()
-
 m = QtGui.QMenu()
+
 def quitCB():
- QtGui.QApplication.quit()
+   QtGui.QApplication.quit()
 def aboutToShowCB():
- print 'about to show'
+   print 'about to show'
+
 m.addAction('Quit', quitCB)
 QtCore.QObject.connect(m, QtCore.SIGNAL('aboutToShow()'), aboutToShowCB)
 i.setContextMenu(m)
 
 svg = QtGui.QIcon('ImageCache.png')
+print svg.availableSizes()
 pm = QtGui.QPixmap(16, 16)
-painter = QtGui.QPainter(pm)
-#svg.render(painter)
-icon = QtGui.QIcon(pm)
-i.setIcon(icon)
+svg.addPixmap(pm) 
+print svg.availableSizes()
+#painter = QtGui.QPainter(pm)
+#test = painter.render(svg)
+#icon = QtGui.QIcon(test)
+i.setIcon(svg)
 i.show()
 
+print 'getting there'
 app.exec_()
 
-del painter, pm, svg # avoid the paint device getting
+del pm, svg # avoid the paint device getting
 del i, icon          # deleted before the painter
 del app