分类切换 :param button: 分类按钮 :param toggled: 是否选中
(self, button, toggled)
| 134 | self.categoryBtnGroups.buttons()[0].setChecked(True) |
| 135 | |
| 136 | def onCategoryChanged(self, button, toggled): |
| 137 | """分类切换 |
| 138 | :param button: 分类按钮 |
| 139 | :param toggled: 是否选中 |
| 140 | """ |
| 141 | if not toggled: |
| 142 | return |
| 143 | widget = button.property('widget') |
| 144 | self.stackedWidgetPictures.setCurrentWidget(widget) |
| 145 | runnable = widget.init() |
| 146 | if runnable: |
| 147 | if not hasattr(self, '_threadPool'): |
| 148 | self._threadPool = QThreadPool(self) |
| 149 | self._threadPool.setMaxThreadCount(5) |
| 150 | widget.showWaiting() |
| 151 | self._threadPool.start(runnable) |
| 152 | |
| 153 | def onPictureDownFinished(self, widget): |
| 154 | widget.showWaiting(False) |
nothing calls this directly
no test coverage detected