I'm using the QtWaitingSpinner found here: https://github.com/snowwlex/QtWaitingSpinner. You can create and start a spinner like so: spinner = QtWaitingSpinner(self); spinner.start(). Unfortunately when I try to make a POST request from my GUI, the spinner halts until a response has been returned. Consequently I don't see the spinner at all, or if I start the spinner prematurely it stops spinning while it waits for the response. I think I'll have to use some sort of asynchronous method like QThread or asyncio but it's unclear what the best way of getting around this is. If anyone can show me the best way to handle it I'd be grateful. Here is a simplified version of what I'm doing:
class Obj(QDialog):
# some button calls this function when pressed
def submit(self):
#start spinner
spinner = QtWaitingSpinner(self)
spinner.start()
# post some data to some url, spinner should spin
r = requests.post('some_url.com', json=some_data)
# stop spinner
spinner.stop()