title: How to Convert Qcolor value to hex value?
body: <p>I have implemented a QColor dialog box which opens on certain condition.  To get the selected color after final selection I use the method <code>selectedColor()</code> which returns the value in QColor. When I print that value, it's like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>&lt;PyQt4.QtGui.QColor object at 0x01DD7880&gt;
  </code></pre>
  
  <p>I want color value in hex value like this: <code>#DFDFDF</code> (for grey). If it's not hex, correct me.</p>
  
  <p>Is there any function to convert that?</p>
  
  <p>Any suggestions welcome.</p>