<p>I am writing a QT application and I need to embed a terminal (we say,xterm) within a QDialog, like some KDE application (see kdevelop/kate/...).</p>

<p>I've been trying with: 
- QX11EmbedContainer placed into the QLayout of my QDialog 
- QProcess for the program I want to excecute</p>

<p>I expect the QProcess running within the QX11EmbedContainer, but it does not work.</p>

<p>The problem is that I can't put the xterm into the QX11EmbedContainer, the only thing I obtain is an xterm window (unfortunately separated from my QDialog).
Does anybody got the same problem?</p>

You need to pass the window ID of the container to the xterm.
If you look at the example in the Qt help for QX11EmbedContainer,  it just passes the window id to the QProcess. Change this to
```
```
QProcess process(&container);
 QString executable(app.arguments()[1]);
 QStringList arguments;
 arguments << "-into" << QString::number(container.winId());
 process.start(executable, arguments);
```
```
where "-into" has been added to the arguments. From the XTerm man page:
-into windowId
Given an X window identifier (a decimal integer), xterm
    will reparent its top-level shell
    widget to that window.  This is  used 
    to embed xterm within other applications.