You are not logged in.

Dear visitor, welcome to If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Wednesday, November 19th 2008, 8:18pm

"QPainter::begin: A paint device can only be painted by one painter at a time" warning


I have got several widgets which I should add into a GraphicsScene...
I found a new class in Qt4.4 "QGraphicsProxyWidget " that makes easier adding widgets into graphicsscene .
I succesfully added most of my widgets as in the embeddeddialogs example of qt; but on some of my widgets I use QGLWidget to make some drawings. At that point qt gives a warning and that widget is not shown on the screen:

QPainter::begin: A paint device can only be painted by one painter at a time

I am adding the widgets as follow:

Source code

            CustomProxy *proxy = new CustomProxy(0, Qt::Window);
            myDialog *dialog1=new myDialog;

Should i use a different design pattern? Any idea?..

Thanks, regards..