Help with terminal emulation (xterm ,qterminal, etc.) - how to access "native window " ?
-
Edited / addendum I am still looking for somebody who is willing to help me instead of just posting text. If it bothers you that my post is not specifically C/C++ code , please ignore it . If it bothers you that my post is too complex , please ignore it also. If it bothers you that my post is poorly written - read how to post / answer questions. Is short - write something helpful and constructive. I am asking for real help to SOLVE this. The main issue is - QProcess runs external "terminal" application - I have tried several with same results - such external application builds / create "window" , which is by C code attached to object created by QtCreator. Window created by Qt displays data retrieved from the external app ( terminal) , I am interested in text only so far. Such data ( text ) can be highlighted by using mouse - as any QT created text, However, this highlighted text is NOT DETECTED by QT - because of what ? And that is the main (IMHO) question which is so far not answered... How does terminal created window "connect" to Qt ? - that is the question. Original post This simple command , entered in Linux "terminal" application results in expected output from "Bluetoothctl" . qterminal -e bluetoothctl When this command is implemented in C++ code , an new "native window" is displayed above current application windows. Similar code can be implemented in C++ for "xterm" or other terminal emulation. My question is - how do I acccess this "native window " in my C++ application ? I can move the "native window" into desired position using winId() but cannot access any data displayed in the native window.
-
Edited / addendum I am still looking for somebody who is willing to help me instead of just posting text. If it bothers you that my post is not specifically C/C++ code , please ignore it . If it bothers you that my post is too complex , please ignore it also. If it bothers you that my post is poorly written - read how to post / answer questions. Is short - write something helpful and constructive. I am asking for real help to SOLVE this. The main issue is - QProcess runs external "terminal" application - I have tried several with same results - such external application builds / create "window" , which is by C code attached to object created by QtCreator. Window created by Qt displays data retrieved from the external app ( terminal) , I am interested in text only so far. Such data ( text ) can be highlighted by using mouse - as any QT created text, However, this highlighted text is NOT DETECTED by QT - because of what ? And that is the main (IMHO) question which is so far not answered... How does terminal created window "connect" to Qt ? - that is the question. Original post This simple command , entered in Linux "terminal" application results in expected output from "Bluetoothctl" . qterminal -e bluetoothctl When this command is implemented in C++ code , an new "native window" is displayed above current application windows. Similar code can be implemented in C++ for "xterm" or other terminal emulation. My question is - how do I acccess this "native window " in my C++ application ? I can move the "native window" into desired position using winId() but cannot access any data displayed in the native window.
-
Edited / addendum I am still looking for somebody who is willing to help me instead of just posting text. If it bothers you that my post is not specifically C/C++ code , please ignore it . If it bothers you that my post is too complex , please ignore it also. If it bothers you that my post is poorly written - read how to post / answer questions. Is short - write something helpful and constructive. I am asking for real help to SOLVE this. The main issue is - QProcess runs external "terminal" application - I have tried several with same results - such external application builds / create "window" , which is by C code attached to object created by QtCreator. Window created by Qt displays data retrieved from the external app ( terminal) , I am interested in text only so far. Such data ( text ) can be highlighted by using mouse - as any QT created text, However, this highlighted text is NOT DETECTED by QT - because of what ? And that is the main (IMHO) question which is so far not answered... How does terminal created window "connect" to Qt ? - that is the question. Original post This simple command , entered in Linux "terminal" application results in expected output from "Bluetoothctl" . qterminal -e bluetoothctl When this command is implemented in C++ code , an new "native window" is displayed above current application windows. Similar code can be implemented in C++ for "xterm" or other terminal emulation. My question is - how do I acccess this "native window " in my C++ application ? I can move the "native window" into desired position using winId() but cannot access any data displayed in the native window.
Member 14968771 wrote:
I need some help implementing xterm...
I'm not sure what you're asking. There's plenty of xterm implementations, and almost all of them will be better than anything you or I or most others here could write. There's even a QT Terminal widget: [GitHub - lxqt/qtermwidget: The terminal widget for QTerminal](https://github.com/lxqt/qtermwidget) But maybe you don't want to actually implement a terminal application? In which case, either I've misunderstood your query, or you need to reframe your question to better reflect what it is you are trying to do.
Keep Calm and Carry On
-
Member 14968771 wrote:
I need some help implementing xterm...
I'm not sure what you're asking. There's plenty of xterm implementations, and almost all of them will be better than anything you or I or most others here could write. There's even a QT Terminal widget: [GitHub - lxqt/qtermwidget: The terminal widget for QTerminal](https://github.com/lxqt/qtermwidget) But maybe you don't want to actually implement a terminal application? In which case, either I've misunderstood your query, or you need to reframe your question to better reflect what it is you are trying to do.
Keep Calm and Carry On
Thanks for reply. I am actually looking for "discussion forum" . I am running out of ideas how to fix my problem. Yes , I did try qterminal - it has no option to run command with options - so I ended up with xterm. It works OK, but I cannot figure out how to FULLY integrate it with my application. I am able to display the command output in my app "window" but it is NOT really my app window - some folks call it "xterm native window ". So I can display it - it is "inside my other window" , I can move it , using my app "wrapper window", but I cannot process anything in it. I am actually hoping that somebody with good grasp of "windows hierarchy" can shed some light on this. In not so techie terms - how do I process data in xterm native window ? I will take a look at xterm man again, maybe the answer is there.