cleve21
cleve21

Reputation: 169

Listen for linux command in a Qt app running in background?

I wonder if there is a way to send data from an OS command (Linux to begin with, but I would be interested about Windows too) to a Qt app working in background. My use case would be to right click in a context menu in a file explorer and then send the path of the selected file(s) to the already running Qt app to trigger an action inside that app.

Can anyone provide some explanations or a link to an example achieving that ? I already read about adding right click in Nemo/Nautilus with some custom config files, I am more interested by the Qt part.

Upvotes: 0

Views: 117

Answers (1)

Manthan Tilva
Manthan Tilva

Reputation: 3277

AFAIK, there is no such component available with QT. (Don't know if anything added recently, I haven't used qt from long time)

But what you can do is write some code in qt app like server ( May be socket server OR pipe), when some data comes on that you can take action based on that data value.

On other side write some small utility which will get called, which send data to you server, with path of selected file when clicked via context menu.

Upvotes: 1

Related Questions