title: How to make a QPushButton the same dimensions as its background-image?
body: <p>I have a QPushButton on my main window:</p>
  
  <pre><code>practiceButton_ = new QPushButton(this);
  practiceButton_-&gt;setText(_("Practice"));
  practiceButton_-&gt;setObjectName("practiceButton");
  </code></pre>
  
  <p>Then I associate some style with it:</p>
  
  <pre><code>qApp-&gt;setStyleSheet("QPushButton#practiceButton { background-image: url('myfile.png'); padding:0; margin:0; border:none; }");
  </code></pre>
  
  <p>The background image shows up and it looks like the style is applied successfully, however the button is smaller than the background image. How can I make it resize to fit its background image?</p>
  
  <p>If it cannot be done automatically, is it possible to access the style applied to the button somewhere, and resize the button based on it? I'd just like to avoid hard-coding the values if I can avoid it.</p>