Use QWindow::windowHandle()->winId() to replace QWidget::winId() due to a bug of Qt5.