Quote Originally Posted by minimoog View Post
BIG Sorry, I didn't noticed that you use QT3, my code was for QT4.

However I analyze your code.

Qt Code:
  1. PaintWidget::PaintWidget(const QString &filename,QWidget *parent):QGLWidget(parent){
  2. data.load(filename);
  3. gldata=QGLWidget::convertToGLFormat(data); //This is error you must have valid OpenGL context
  4. resize(data.size());
  5. }
To copy to clipboard, switch view to plain text mode 

For displaying half image you can use, QImage::copy()

Qt Code:
  1. void PaintWidget::paintGL(){
  2. QImage halfImage = data.copy(0, 0, data.width()/2, data.height()/2);
  3. gldata = QGLWidget::convertToGLFormat(halfImage);
  4. glDrawPixels(gldata.width(), gldata.height(), GL_RGBA, GL_UNSIGNED_TYPE, gldata.bits());
  5. }
To copy to clipboard, switch view to plain text mode 
Thank you very much
can you tell me how to display small image or some copied image by copy() on full screen