Click here to Skip to main content
15,609,601 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: List assertation failure Pin
Graham Breach2-Oct-22 21:46
Graham Breach2-Oct-22 21:46 
GeneralRe: List assertation failure Pin
ForNow3-Oct-22 8:49
ForNow3-Oct-22 8:49 
AnswerRe: List assertation failure Pin
CPallini2-Oct-22 21:08
mveCPallini2-Oct-22 21:08 
GeneralRe: List assertation failure Pin
ForNow2-Oct-22 22:17
ForNow2-Oct-22 22:17 
QuestionConnect to terminal native window - repost Pin
Member 149687712-Oct-22 9:45
Member 149687712-Oct-22 9:45 
AnswerRe: Connect to terminal native window - repost Pin
Dave Kreskowiak2-Oct-22 16:49
mveDave Kreskowiak2-Oct-22 16:49 
AnswerRe: Connect to terminal native window - repost Pin
Richard MacCutchan2-Oct-22 22:34
mveRichard MacCutchan2-Oct-22 22:34 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687713-Oct-22 7:50
Member 149687713-Oct-22 7:50 
Here is work in progress copy of the problematic code.
It does not matter what terminal application is actually coded,
the results are same

with this parameter the terminal window is attached / on top of Qt object window

into" <<QString::number(winId())


without the above parameter
the terminal window became free floating anywhere on desktop and can be moved by mouse

the issue is

how to "link " Qt process created terminal window with Qt running application.

The odd thing is - I can highlight the terminal window text using mouse in Qt running application,
hence Qt is aware of the terminal window , hence the question remains - how to use this involvement , where is the connection between running QT app and running "terminal"?

I was hoping to run other applications FROM Qt and cannot do without solving this first.

My best guess is - since QT QProcess starts / execute EXTERNAL application and allegedly has no
knowledge about the executing application
( how does it highlight the terminal text without such knowledge ?)
the relation may be between Qt and operating system.



Same question posted in Qt forum produced this

not a Qt problem

extract the terminal text using regular expression -
done that and that does not get even close
to answer the relations question


PS If it helps I could post a link to Qt forum where I can post screen shot
to illustrate the problem.




<pre>        QProcess *process = new QProcess(parent);
        // qDebug() << "Windid " << QString::number(winId());
        processTERMINAL = new QProcess();
        QString exec = "xterm";
        QStringList params;




        params << "-T" << "bluetoothctl no options (interactive) case 0 +hold " << "-fa" <<"Monospace" << "-fs" << "14"<< "+hold" <<
                  //       "-into" << QString::number(winId) <<
//                  "-into" <<QString::number(winId())<<
    "-into" <<QString::number(child->winId())<<
                  "-e" << "bluetoothctl";

        qDebug() <<"params " << params;
        processTERMINAL->start(exec, params);
        if(processTERMINAL->waitForStarted())
        {
            qDebug() << " processTERMINAL->waitForStarted() OK";
            qDebug() << processTERMINAL->readAllStandardError();
            qDebug() << processTERMINAL->readAllStandardOutput();

            //process->size(100,100)
            //processTERMINAL->open();
            //process->write("help\n");
            //ui->textEdit_124->append(process->readAllStandardOutput());

        }


GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan3-Oct-22 9:15
mveRichard MacCutchan3-Oct-22 9:15 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687713-Oct-22 11:13
Member 149687713-Oct-22 11:13 
GeneralRe: Connect to terminal native window - repost Pin
k50543-Oct-22 11:58
mvek50543-Oct-22 11:58 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687713-Oct-22 17:06
Member 149687713-Oct-22 17:06 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan3-Oct-22 21:54
mveRichard MacCutchan3-Oct-22 21:54 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687714-Oct-22 3:43
Member 149687714-Oct-22 3:43 
QuestionRe: Connect to terminal native window - repost Pin
David Crow4-Oct-22 5:17
David Crow4-Oct-22 5:17 
AnswerRe: Connect to terminal native window - repost Pin
Member 149687714-Oct-22 7:03
Member 149687714-Oct-22 7:03 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687714-Oct-22 19:10
Member 149687714-Oct-22 19:10 
GeneralRe: Connect to terminal native window - repost Pin
k50545-Oct-22 4:32
mvek50545-Oct-22 4:32 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687715-Oct-22 9:37
Member 149687715-Oct-22 9:37 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan5-Oct-22 22:47
mveRichard MacCutchan5-Oct-22 22:47 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687716-Oct-22 4:42
Member 149687716-Oct-22 4:42 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan6-Oct-22 4:56
mveRichard MacCutchan6-Oct-22 4:56 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687717-Oct-22 8:57
Member 149687717-Oct-22 8:57 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan7-Oct-22 9:25
mveRichard MacCutchan7-Oct-22 9:25 
Questionx86 Assembly Language Pin
Member 1578377429-Sep-22 23:51
Member 1578377429-Sep-22 23:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.