Embed an application into Qt app

 

https://bugreports.qt.io/browse/QTBUG-40320

// Find winid by using xwininfo

    WId id = 0x62000c0;
    
    // Part 1
    QWindow* window = QWindow::fromWinId(id);
    window->show();
    window->requestActivate();

    // Part 2
    QWidget* widget = QWidget::createWindowContainer(window);
    //widget->show();
    ui->gridLayoutEmbed->addWidget(widget);
    ui->gridLayoutEmbed->update();