[Development] How to get winid from qprocess id for QProcess

Sujan Dasmahapatra yellowlemontree0821 at gmail.com
Thu Feb 20 16:36:09 CET 2020


hi friend

I am running an external app, which I want to fit onto my QScrollArea, for
this I am writing code like this.

// launch weasis
QProcess *process = new QProcess();
process->start("./viewer-win32.exe");
if (process->waitForFinished())
{
return;
}

QWindow *window = QWindow::fromWinId(211812356);
window->setFlags(Qt::FramelessWindowHint);
_patient_gui->scrollArea_1->setWidget(QWidget::createWindowContainer(window));

But how can I get the wind id? it is hard coded here, is there any way to
get the id from process id.

any help is highly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200220/246ed64f/attachment.html>


More information about the Development mailing list