コード例 #1
0
    def positionChanged(self):
        super().positionChanged()

        z = SLib.getNearestZoneTo(self.parent.objx, self.parent.objy)
        if z is not None:
            self.LiqOrFogAux.OuterRect = QtCore.QRectF(z.BoundingRect)

            self.LiqOrFogAux.setX(z.x() + 4)
            self.LiqOrFogAux.setY(z.y())
            self.LiqOrFogAux.OuterRect.setWidth(z.BoundingRect.width() - 8)
            self.LiqOrFogAux.OuterRect.setHeight(z.BoundingRect.height())

            self.LiqOrFogAux.updateSize()
コード例 #2
0
    def positionChanged(self):
        super().positionChanged()

        z = SLib.getNearestZoneTo(self.parent.objx, self.parent.objy)
        if z is not None:
            self.LiqOrFogAux.OuterRect = QtCore.QRectF(z.BoundingRect)

            self.LiqOrFogAux.setX(z.x() + 4)
            self.LiqOrFogAux.setY(z.y())
            self.LiqOrFogAux.OuterRect.setWidth(z.BoundingRect.width() - 8)
            self.LiqOrFogAux.OuterRect.setHeight(z.BoundingRect.height())

            self.LiqOrFogAux.updateSize()