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 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