How parent object affect painting to child object?
Page |
1 |
I am painting the child object using event filter. I am getting improper painting in child widget but If i am removing parent object then i am getting proper painting.
23 replies
And what does proper resp. improper painting mean for you? Can you provide a screenshot showing how it should look like and how it actually looks like?
ya for image see the link below
http://www.imgplace.com/viewimg221/4369/95paint.png
The white color around the qlineedit widget corresponding to emil-id and password is the problem.
Just use the system as it was designed to be used: by letting each widget paint itself.
I have tried as you told but i am getting the same problem but the problem is coming in mac only not in windows.But one thing i noticed that when we press tab key the paint event is called infinite number of times.
Sorry, my crystal ball is broken, so I cannot see your code without you posting it.
this is the code for paint event which i have used
- {
- // Store the source rect of the image.
- // Store the target rect where image is to be drawn.
- // Draw the image.
- paint.drawPixmap (target, pixmap, source);
- i++;
- qDebug ()<<"event"<<i;
- }
How about you start out with a call to QWidget::paintEvent(event); between your lines 2 and 3? Replace the QWidget with whatever is the base class of your widget. That way, the base class also gets a chance to do painting.
I have tried this also but same problem persists. Do you have mac system? If you have i will post you the sample code so that you can check.
You must log in to post a reply. Not a member yet? Register here!



