I don' see that your problem has anything to do with QGLWidget. I am testing on Windows, though so there could be some differences.

I guess you are wondering why the grayscale conversion takes forever.
Firstly don't use pixel() and setPixel() they are really inefficient!
Secondly, don't post more events than you need! That way it's no wonder that the event loop gets busy.

Just as a test try the following:
Qt Code:
  1. if(y%100==0)
  2. QCoreApplication::postEvent(anaPen,new IplikEvent(4,mesajStr.setNum((100*y)/height)) );
  3. QRgb* rgbLine = (QRgb*)crntImg->scanLine(y);
  4. QRgb* grayLine = (QRgb*)sonucImg->scanLine(y);
  5. for (uint x=0 ; x<width; ++x)
  6. {
  7. QRgb rgb = *rgbLine++;
  8. uchar graylevelNTSC = (11 * qRed(rgb) + 16 * qGreen(rgb) + 5 * qBlue(rgb) )/32;
  9. *grayLine++ = qRgb(graylevelNTSC,graylevelNTSC,graylevelNTSC);
To copy to clipboard, switch view to plain text mode 

And as a matter of coding style, I suggest you encapsulate your classes better. There is no way GriYapIpligi.cpp should have to include all the header files in your project.