Вопрос

I need to detect when an HDMI cable has been plugged or unplugged. Getting a notification would be best, but polling would also do. I am using Qt (and Qt Creator as IDE). I don't need this to be cross platform, I can use OS-specific system calls.

Это было полезно?

Решение

Just from the top of my head: you can write a udev rule which sends a message via dbus to your application.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top