Qt - Recursive repaint needed, how?
===

I have the following code:

    paintGL()
    {
    
        if(mouse_was_clicked)
        {
           ... do the color picking with openGL to identify a clicked element
    
           ... !!! now I need to call again paintGL() to switch the selected element from the 
                  old one to the new one but I can't create a recursive cycle!
        }
        else
        {
           ... normal code to draw the scene and the selected element in red ...
        }
    }


As the lines suggest, I need a way to call once more the paint event.. is there any way to accomplish this without creating a potential livelock? Something like deferring a new paint event?