View Full Version : a derived QGLWidget displays as a very samll image in the top left corner of a QFrame

7th September 2008, 04:21
hi all,

I am using QT3 in Linux.

I derived a widget named drawWidget from QGLWidget. In my user interface, I created a QFrame named drawFrame and used to hold drawWidget. That means that drawFrame is the parent widget of the drawWidget:

drawWGT = new drawWidget( data, drawFrame, "Line editor");

But when the program runs, the drawWidget always displays as a very small image in the top left corner of the drawFrame. Would you please show me any information on how to stretch the drawWidget to fill the drawFrame?

Thanks a lot!


7th September 2008, 11:47
Did you use layouts properly ???
Such prob usually occur when u create a child widget and forget to put it in a layout. The child is shown at (0,0) of the parent widget.