Skip to content

BUG: Fix deprecated use of QPixmap::grabWidget

Created by: jamesobutler

This fixes a deprecation warning QPixmap::grabWidget is deprecated, use QWidget::grab() instead. To replicate the warning, use ScreenCapture module to capture a single image of all views.

This use case was accidentally overlooked when https://github.com/Slicer/Slicer/commit/70c23d09a3fa6e970b6ae1c24e055b123e015e11 was committed which fixed other instances.

Once Slicer is no longer trying to support both Qt4 and Qt5, then QWidget::grab() can be used directly. Currently ctkWidgetUtils.grabWidget is used which uses QPixmap::grabWidget if Qt4 and QWidget::grab if Qt5.

Merge request reports

Loading