I have a button with a slot connected to its clicked() signal.
The slot is a time consuming task and take many seconds.
When trying to re-click the button before the slot ends, I can't.
How to make the button responsive when running the slot connected to its clicked() signal?
You have two high-level choices:
QtConcurrent::run(), and on the GUI side you'll need to worry about handling all the GUI events appropriately while your operation executes.
QApplication::processEvents()often enough that the GUI remains responsive (e.g., on the inside of a loop): this won't work if the time-consuming operation is 3rd party code you can't break out of, and you'll still need to work out how to handle GUI operations while you've got your long-running task executing.
You'll find that the first choice is by far the consensus better choice over the second, FWIW.