MCPcopy Index your code
hub / github.com/PyQt5/PyQt / onActionTriggered

Method onActionTriggered

QGridLayout/HotPlaylist.py:172–181  ·  view source on GitHub ↗
(self, action)

Source from the content-addressed store, hash-verified

170 self.loadWidget.setVisible(started)
171
172 def onActionTriggered(self, action):
173 # 这里要判断action=QAbstractSlider.SliderMove,可以避免窗口大小改变的问题
174 # 同时防止多次加载同一个url
175 if action != QAbstractSlider.SliderMove or self._loadStart:
176 return
177 # 使用sliderPosition获取值可以同时满足鼠标滑动和拖动判断
178 if self.verticalScrollBar().sliderPosition() == self.verticalScrollBar(
179 ).maximum():
180 # 可以下一页了
181 self._widget.load()
182
183 def resizeEvent(self, event):
184 super(Window, self).resizeEvent(event)

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected