PDA

View Full Version : repaint help pls



munna
20th June 2006, 10:08
Hi,

I have subclassed QScrollView and have reimplemented drawContents. The problem is when my window is not the focused one and when someone moves some other window on my window the repaint is not happening. Which method should I reimplement to solve this problem?

Thanks a lot.

e8johan
20th June 2006, 12:32
What version of Qt are you using?
Do you get paint events?
If you're using Qt 4, do you draw somewhere outside drawContents?

My recommendation is to create a widget that lays inside the scroll view - in that way you avoid one extra layer of complexity. See http://qt4.digitalfanatics.org/articles/zoomer.html for my example.

munna
20th June 2006, 12:39
What version of Qt are you using?

I am using Qt 3.3.6.


Do you get paint events?

yes I do. I have reimplemented the paintEvent in the following way.



void Paper::paintEvent(QPaintEvent *e)
{
QScrollView::paintEvent(e);
updateContents();
}


Please Help
Thanks a lot.

munna
21st June 2006, 10:52
Can some one please help me on this ?

Thanks a lot.