API
- qtgallery.qtscraper(block, block_vars, gallery_conf)
Basic implementation of a Qt window scraper.
Looks for any non-hidden windows in the current application instance and uses
grabto render an image of the window. The window is closed afterward, so you have to callshow()again to render it in a subsequent cell.processEventsis called twice with a delay between in case events still need to propagate.Intended for use in
image_scrappersin the sphinx-gallery configuration.
- qtgallery.reset_qapp(gallery_conf, fname)
Shutdown an existing QApplication and disable
exec_.Disabling
QApplication.exec_means your example scripts can run the Qt event loop (so the scripts work when run normally) without blocking example execution by sphinx-gallery.Intended for use in
reset_modulesin the sphinx-gallery configuration.