PDA

View Full Version : Detecting whether an HDMI cable has been plugged in and adjusting screen resolution



Plox
27th September 2013, 10:20
Good day fellow programmers,

I was wondering whether there is a way to detect if an HDMI has been plugged in Linux Debian running on a Raspberry Pi?
In that case I would like to start a function determining the connected monitors screen resolution.

Is there any way to do this straight out of Qt?

Thanks for your answers!

Plox
11th December 2013, 20:37
Hi again,
I found a solution to this task and it's actually quite easy.
All you need to do is query the current screen resolution every second and react based on the values it delivers.

That way there is no need to detect an event such as a recently plugged in HDMI cable.

Cheers,
Plox