Quote Originally Posted by jacek
Which update() do you call?
Jacek,

I call QCanvasItem.update(). Well, it is a subclass where I implement the drawing of the item. Whenever a data even occurs in my system I have to go through a lengthy formatting procedure and prepare the output, then I call update() to get the data rendered. I would like to not have to go through the formatting if the item is not being displayed anyway. So what I want is:


Qt Code:
  1. fOnData(char* szData)
  2. {
  3. if !isObscured()
  4. {
  5. fFormatData(szData);
  6. update();
  7. }
  8.  
  9. // Ignore data as it is not rendered anyway
  10. else
  11. {
  12. }
  13. }
To copy to clipboard, switch view to plain text mode 


If the items gets uncovered and a paint even issued I can recover the data and do the formatting then. The data events occur with a 100ms frequency and there can be thousands of them, so it is important to not incur this overhead until it is really needed.

Thanks,
Tom