Looking for "windowing " expert.
-
I am NOT asking for "Windows" operating system, I am looking for somebody who is an expert in understanding of GUI windowing concept. How different layers of window objects interact , how parent and child window works - in general.
Again I am NOT asking about "Windows" OS. And I am NOT asking for code examples either.Reason for posting this here - I have an issue with relation between OS and two applications and so far NOBODY in this forum is able to work on such problem - they all are experts in resolving SINGLE application issues.
I need to resolve an issue involving OS (Linux) ,events (callbacks) , Qt application , process started by Qt and running under Qt.
-
Are you asking how one process communicates to another process? https://doc.qt.io/qt-5/ipc.html
-
@fcarney Lets start with definitions - in general one runs an application - that is the "top" layer / class in QT. If we agree - it could be called "(main ) process" . It runs under "supervision " of system "operating system ".
Now QT has a class which can start new process and to a degree can monitor ( read SIGNAL) such process . In my example this new process runs "system command" = such command responds with text - using standard stdout. QT can read "stdout"....The link you have referenced is about "interprocess communication" - so is "stdin / stdout ""interprocess communication" ?
But stdout is only part of the equation.
Again in my example - the command actually builds/ creates a "window" - hence my question about "widowing". I can put a mouse on the window text and highlight it.
And that is what I am missing - what "process" receives and reacts on the mouse click?
Is it my "main application" process ?
Is it the 'command - new process " ?
Is it operating system ?Where do I start ?
-
If you are not launching a new process (via QProcess), then both the original window and the new window are part of the same process. Events will go to the window that the mouse is currently inside of. So if you hover or click the new window it gets the events. But the events for either window are part of the same process.
If you are launching a new process then any clicks on the window of the new process will only be seen by that process. Any clicks in the main process will only be seen by that process. Their event systems are completely separate.
What are you wanting to do with the new process?
-
This post is deleted!
-
@fcarney . I can put a mouse on the NEW PROCESS window text and highlight it.
I want to "copy / drag and drop" the highlighted text into another (original process ) window .As far as I know QT QProcess for example "keeps track" of "new process finished " event.
It has no other link with the new process ,, so I assume it "runs" under OS , separated from QT process.What I want is to
- detect event in new process and "link it" with the original process - MDI child window widget in my case.
- use QT "drag and drop" object to get the new process text to the original process .
I can highlight the text in the new process , but have no idea how to detect the "highlighted event " and use it .
-
If you want to drag text from new process to original process look into drag and drop events. The original process (I assume you are writing this one) will need to handle a drag event. Does the new process act like it is allowing you to drag the text? If not you might have to instead do some kind of copy paste events. I don't think you will see any of these events from QProcess.
-
@fcarney said in Looking for "windowing " expert.:
If you want to drag text from new process to original process look into drag and drop events. The original process (I assume you are writing this one) will need to handle a drag event. Does the new process act like it is allowing you to drag the text?
I can highlight the text in the new process window.
I am asking - how to detect this event in the new process .The new process is "inside " MDI child window.
Should I look for MDI child window events first ?If not you might have to instead do some kind of copy paste events. I don't think you will see any of these events from QProcess.
-
@AnneRanch said in Looking for "windowing " expert.:
I am asking - how to detect this event in the new process .
Is this a process you wrote in Qt? If no, then you cannot see that event. That event is only present in the new process and cannot be seen by the calling process.
-
@AnneRanch I think the OS probably only sees mouse events and sends those to the app. The application is most likely not communicating text selection status to the OS.
Maybe there is something communicated in Linux though. I know in Linux you can select text and then middle click in another app to paste that text. But in Windows you have to do an explicit copy and then paste. Unless the app itself does something with the clipboard.
-
@fcarney said in Looking for "windowing " expert.:
I know in Linux you can select text and then middle click in another app to paste that text.
That is just because selecting text e.g. in a terminal copies to clipboard and middle-click pastes. That's in older X-windows based, now they are changing over to context menu and picking copy/paste. But it makes no difference to what is going on, just which actions copy to/paste from clipboard.
-
@JonB OK, I have posted similar subject elsewhere. The discussions went nowhere, so I decided to try the "OS / window event" approach here. Perhaps I need to find how the new process result of bluetoothctl command physically highlights the text.
If I can solve that , I am sure I can find a way to "hook into" whatever event highlights the text.PS My OS is Linux .