Custom buttons in OpenGL ES 2.0 on QOpenGLWindow


I made custom buttons in OpenGL ES 2.0 on QOpenGLWidnows. I made a click detection using the color ID method + glReadPixels. It works without problems on Desktop:


But when I build it for Android emulator it works in wrong way. Maybe someone had the same problem and knows how to solve it:


It looks like buttons are here: