Please add a uniform parameter in your glsl shader program.
Then set value to this parameter using glGetUniformLocation[To get the parameter id to cpp program] and glUniform [To change the value of parameter]
uniform float fAlphaValueByUser_i;
void main()
{
gl_FragColor = gl_Color;
gl_FragColor.a = fAlphaValueByUser_i; }
GLint nAlphaLocation = glGetUniformLocation( m_ProgramID, "fAlphaValueByUser_i" );
glUniform1f( nAlphaLocation, fAlphaValueFromGUI );