[Interest] QGLContext::makeCurrent(): Failed. Why?

2013-01-20 Thread Guido Seifert
Hi, I have a strange warning, which I don't understand.

I try to render an image with OpenGL in a thread. Below the relevant part.

QImage GLWidget::paintGL(QGLPixelBuffer *buffer){
 glPushMatrix();
 mEndImageTexture = buffer-bindTexture(mEndImage,GL_TEXTURE_2D);

 glCallList(mIndex);
 glPopMatrix();
 
 glPushMatrix(); 
 float value = pow(1.6,mFactor-10)+1;
 glScalef(1.0/value, 1.0/value, 1.0/value);

 mStartImageTexture = buffer-bindTexture(mStartImage,GL_TEXTURE_2D);
 
 glCallList(mIndex);
 glPopMatrix();

 glFlush();
 QImage image = buffer-toImage();

#if 0
buffer-deleteTexture(mEndImageTexture);
buffer-deleteTexture(mStartImageTexture);
#endif
 return image;
}

So far so good. Nothing special, the OpenGL code will be cleaned up a bit, when 
I am a little more comfortable with it. 

But as can be seen, I bind two textures to a QGLPixelBuffer. Later on I try to 
delete them again #if 0/#endif. When I activate the deleteTexture functions I 
get a warning: QGLContext::makeCurrent().

I have no idea why and don't even know what QGLContext is meant. Can someone 
enlighten me?

Guido

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QNetworkAccessManager in a command line, non-eventloop application

2013-01-20 Thread Giuseppe D'Angelo
On 20 January 2013 17:29, Scott Aron Bloom scott.bl...@onshorecs.com wrote:

 Honestly, if qNAM had the ability to set the timeout, I would have no problem 
 with a blocking call..

Start a QTimer and abort the QNetworkReply if it fires before
finished(), and viceversa.

Cheers,
-- 
Giuseppe D'Angelo
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest