def setShadowWidth(self, width): self.shadowWidth = width self.shadowMargins = QtCore.QMargins(self.shadowWidth, self.shadowWidth, self.shadowWidth, self.shadowWidth) self.setContentsMargins(self.shadowMargins) _dropShadow = QtWidgets.QGraphicsDropShadowEffect(self) _dropShadow.setBlurRadius(self.shadowWidth) _dropShadow.setColor(Qt.black) _dropShadow.setOffset(0.0) self.setGraphicsEffect(_dropShadow) self.update(self.rect()) xutils.show_shadow(xutils.get_xwindow(int(self.winId())), str(width))
def getXWindow(self): return xutils.get_xwindow(int(self.winId()))