Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QProcess app on QWidget, no title & menu bar



  • hi folks,

    I am trying launch an external application, through QProcess, and then trying to set this app on a QWidget. It is working partially, but the app's header title is not appearing. What am I doing wrong, In fact the menu bar is also not hidden. Kindly help me how can I get rid of it.

    here's below my code snippet.

        QProcess *process_ = new QProcess();
        process_->start(".\\MGL\\MGL.exe  C:\\datasets\\T1.nii");
        Sleep(20000);
        if (process_->waitForStarted(-1))
        {
            //0.00289917 0.28096 -0.180618 = 343
            HWND id2 = FindWindow(0, L"MGL");
    
            if (!id2)
                return;
            QTimer t2;
            t2.start(2500);
            QWindow* window2 = QWindow::fromWinId((WId)id2);
            QWidget* widget2 = QWidget::createWindowContainer(window2);
            setCentralWidget(widget2);
        }
    

Log in to reply