title: Painting using PYQT
body: <p>I am trying to implement a program like paint in PYQT. I am trying to use the code of Scribble example in PYQT package which can be found in: C:\Python26\Lib\site-packages\PyQt4\examples\widgets. Now regarding this I have 2 questions:</p>
  
  <ol>
  <li>In the Scribble program, when painting, the paint doesn't get updated visually in real-time as you are holding the mouse button and scribbling. I found out that this problem comes from the function drawLineTo from class ScribbleArea, the line:</li>
  </ol>
  
  <p><code>self.update(QtCore.QRect(self.lastPoint, endPoint).normalized().adjusted(-rad, -rad, +rad, +rad))</code></p>
  
  <p>Now if I simply replace this line with </p>
  
  <pre><code>self.update()
  </code></pre>
  
  <p>the problem is solved, but the cursor is not in the exact location the paintin happens.</p>
  
  <p>Do you know what parameters I can add in the self.update() which solves both problems?</p>
  
  <ol>
  <li>I want to open an image as Scribble does and paint on it and then save only the paint with a blank lets say white background (without the original image in the back ground). Can you tell me how to do this?</li>
  </ol>
  
  <p>I would appreciate your answer to either of the questions.</p>
  
  <p>Thanks!</p>