roundedButtonSet.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:defconQt 作者: trufont 项目源码 文件源码
def mouseReleaseEvent(self, event):
        if event.button() == Qt.LeftButton:
            clickedRect = self._optionsRects[self._clickedIndex]
            if QRect(*clickedRect).contains(event.pos()):
                self._selection = {self._clickedIndex}
                if self._selectionMode > 1 and QApplication.keyboardModifiers(
                        ) & Qt.ShiftModifier:
                    shiftSelection = self._selection ^ self._oldSelection
                    if shiftSelection:
                        self._selection = shiftSelection
                self.clicked.emit()
            else:
                self._selection = self._oldSelection
            self.update()
            del self._clickedIndex
            del self._oldSelection
        else:
            super().mouseReleaseEvent(event)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号