was aendere ich an diesem Code, um ihn unter PyQt4 zum laufen zu bringen ?
Es muss auch unter Windows laufen, daher der Port zu PyQt4
Code: Alles auswählen
class mySelecter(QCanvasRectangle):
""" This class define the rectangle drawn when moving the mouse with de Shfit button pressed. It allows the user to select multiple devices"
"""
def __init__(self, x,y,w=1,h=1,canvas=None):
QCanvasRectangle.__init__(self,x,y,w,h,canvas)
self.setPen( QPen(QColor(0,0,0),1,Qt.DotLine) )
def boundingRect(self):
rect = QCanvasRectangle.boundingRect(self)
return QRect(rect.x()-5,rect.y()-5,rect.width()+5,rect.height()+5)
Vielen Dank