Click here to Skip to main content
15,504,549 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: List assertation failure Pin
Graham Breach2-Oct-22 22:46
Graham Breach2-Oct-22 22:46 
GeneralRe: List assertation failure Pin
ForNow3-Oct-22 9:49
ForNow3-Oct-22 9:49 
AnswerRe: List assertation failure Pin
CPallini2-Oct-22 22:08
mveCPallini2-Oct-22 22:08 
GeneralRe: List assertation failure Pin
ForNow2-Oct-22 23:17
ForNow2-Oct-22 23:17 
QuestionConnect to terminal native window - repost Pin
Member 149687712-Oct-22 10:45
Member 149687712-Oct-22 10:45 
AnswerRe: Connect to terminal native window - repost Pin
Dave Kreskowiak2-Oct-22 17:49
mveDave Kreskowiak2-Oct-22 17:49 
AnswerRe: Connect to terminal native window - repost Pin
Richard MacCutchan2-Oct-22 23:34
mveRichard MacCutchan2-Oct-22 23:34 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687713-Oct-22 8:50
Member 149687713-Oct-22 8: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 10:15
mveRichard MacCutchan3-Oct-22 10:15 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687713-Oct-22 12:13
Member 149687713-Oct-22 12:13 
GeneralRe: Connect to terminal native window - repost Pin
k50543-Oct-22 12:58
mvek50543-Oct-22 12:58 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687713-Oct-22 18:06
Member 149687713-Oct-22 18:06 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan3-Oct-22 22:54
mveRichard MacCutchan3-Oct-22 22:54 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687714-Oct-22 4:43
Member 149687714-Oct-22 4:43 
QuestionRe: Connect to terminal native window - repost Pin
David Crow4-Oct-22 6:17
David Crow4-Oct-22 6:17 
AnswerRe: Connect to terminal native window - repost Pin
Member 149687714-Oct-22 8:03
Member 149687714-Oct-22 8:03 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687714-Oct-22 20:10
Member 149687714-Oct-22 20:10 
GeneralRe: Connect to terminal native window - repost Pin
k50545-Oct-22 5:32
mvek50545-Oct-22 5:32 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687715-Oct-22 10:37
Member 149687715-Oct-22 10:37 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan5-Oct-22 23:47
mveRichard MacCutchan5-Oct-22 23:47 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687716-Oct-22 5:42
Member 149687716-Oct-22 5:42 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan6-Oct-22 5:56
mveRichard MacCutchan6-Oct-22 5:56 
GeneralRe: Connect to terminal native window - repost Pin
Member 149687717-Oct-22 9:57
Member 149687717-Oct-22 9:57 
GeneralRe: Connect to terminal native window - repost Pin
Richard MacCutchan7-Oct-22 10:25
mveRichard MacCutchan7-Oct-22 10:25 
Questionx86 Assembly Language Pin
Member 1578377430-Sep-22 0:51
Member 1578377430-Sep-22 0: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.