Replace Qt5 only API QWidget::grab() with QWidget::render() when compiled with Qt4.