def initUI(self):
l = QtGui.QVBoxLayout(self)
l.setContentsMargins(0,0,0,0)
w = QtGui.QFrame(self)
l.addWidget(w)
self._layout = QtGui.QVBoxLayout()
#self.setLayout(self._layout)
w.setLayout(self._layout)
self._layout.setContentsMargins(0,0,0,0)
icnPath = "/Users/draknova/Documents/workspace/sPipe/bin/images/icons/"
icn1 = QtGui.QIcon(QtGui.QPixmap("%s/home.png"%(icnPath)))
icn2 = QtGui.QIcon(QtGui.QPixmap("%s/server.png"%(icnPath)))
icn3 = QtGui.QIcon(QtGui.QPixmap("%s/database.png"%(icnPath)))
icn4 = QtGui.QIcon(QtGui.QPixmap("%s/network.png"%(icnPath)))
icn5 = QtGui.QIcon(QtGui.QPixmap("%s/settings.png"%(icnPath)))
b1 = QtGui.QPushButton(icn1,"")
b2 = QtGui.QPushButton(icn2,"")
b3 = QtGui.QPushButton(icn3,"")
b4 = QtGui.QPushButton(icn4,"")
b5 = QtGui.QPushButton(icn5,"")
self._layout.addWidget(b1)
self._layout.addWidget(b2)
self._layout.addWidget(b3)
self._layout.addWidget(b4)
self._layout.addWidget(b5)
self._layout.addStretch()
评论列表
文章目录