MCPcopy
hub / github.com/PyQt5/PyQt / onActionTriggered

Method onActionTriggered

QFlowLayout/HotPlaylist.py:155–164  ·  view source on GitHub ↗
(self, action)

Source from the content-addressed store, hash-verified

153 self.loadWidget.setVisible(started)
154
155 def onActionTriggered(self, action):
156 # 这里要判断action=QAbstractSlider.SliderMove,可以避免窗口大小改变的问题
157 # 同时防止多次加载同一个url
158 if action != QAbstractSlider.SliderMove or self._loadStart:
159 return
160 # 使用sliderPosition获取值可以同时满足鼠标滑动和拖动判断
161 if self.verticalScrollBar().sliderPosition() == self.verticalScrollBar(
162 ).maximum():
163 # 可以下一页了
164 self._widget.load()
165
166 def resizeEvent(self, event):
167 super(Window, self).resizeEvent(event)

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected