mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
This allows (in some circumstances) scripts running in the console to be halted via the Ctrl (or Meta) + C shortcut. (It's only possible to catch and abort when the script is printing outputs to the console - because this triggers QCoreApplication.processEvents() calls. Without these calls the whole QGIS application is unresponsive during script execution and there's no ability to even catch a shortcut in order to halt the execution. Still, even with this limitation it's handy to be able to break out of lengthy: for f in iface.activeLayer().getFeatures(): print(f.attributes()) loops!)