title: Qt: Getting the current application palette
body: <p>I have a class that composes a palette and assigns it to the application using <code>QApplication::instance()-&gt;setPalette(QPalette palette)</code>.</p>
  
  <p>And it effectively works.</p>
  
  <p>But then I try to use <code>QPalette QApplication::instance()-&gt;palette()</code> to extract some colours.</p>
  
  <p>But here it does not work, it just returns the default palette, not the current one.</p>
  
  <p>After I have discovered that it is working as supposed and described in the documentation.</p>
  
  <p>And now I have just 2 questions:</p>
  
  <ol>
  <li>Why it is working in such a strange, useless and counter-intuitive
  mode?</li>
  <li>How I can retrieve the palette which was set using
  <code>QApplication::instance()-&gt;setPalette(QPalette palette)</code>?</li>
  </ol>
  
  <p>P.S. No, I can't keep that palette elsewhere.</p>