View Full Version : QWidget inside Q3WidgetStack - Not able to load the widget

18th June 2012, 20:10

I am beginner in QT and i am facing a problem while i try to load a QGLWidget. I am using QWidget inside the Q3WidgetStack.
I have already loaded one screen and it is working fine by calling the below described methods and raising the widget.
Now when i am trying to load the second screen by having another Qwidget into the Q3WidgetStack and by calling in the same fashion i am not able to see the expected result.

I am using the
below mentioned QT commands

i know that when i call the respective widget 3 functions gets called which is overridden as per application needs.
i do not see them called at all. I have added some print functions to console to see if it is called.
I do not see either InitialzeGL, resizeGL or paintGL being called.

Kindly help me to come out of this situation

19th June 2012, 01:44
Are you trying to port a Qt3 application to Qt 4? If not, you should be using QStackedWidget.

19th June 2012, 08:32

No i am not porting any QT Application.I am using a widget which was listed in the Qt3 support tab of the widget box.
But i do not understand how does this make a difference even if i use a Qt3 support widgets.

19th June 2012, 08:47
It makes a difference because you are putting effort into learning the wrong API. That's your call though.

So, what is the expected result you are not seeing, and what are you actually seeing? I am assuming, because you do not tell us exactly, that X is a QGLWidget*.

19th June 2012, 14:43

Yes u r right X is my QGLWidget instance and what i am not seeing is the print functions which ever i have added and the respective screen is not visible.

Added after 8 minutes:


You r right X is my QGLWidget instance,and what i am not able to see is my print functions in InitializeGL,resizeGL or in paintGL onto the console and moreover i do not see the respective screen.