yes, I have already written my code in these functions. And if I create a new instance of qglwidet instance then it works fine. The problem is that how should I show it in widget made in desinger