I have added a QToolButton to a QWidget on a QToolBar. Now I'm trying to add a icon to the QToolButton, but the icon is not fitting the buttons' dimensions even though the size of the button is almost same as the button. I'ev added the image in resource file under :/imgs/. Below I've produced the code for perusal.
Kindly help me with this. Thank you.

Qt Code:
  1. m_pbSummary = new QToolButton();
  2. m_pbSummary->setFixedSize(SUMMARY_BUTTON_WIDTH, SUMMARY_BUTTON_HEIGHT);
  3. m_pbSummary->setStyleSheet("QToolButton {color: #333; border: 2px solid #555; border-radius: 11px; padding: 5px; background: qradialgradient(cx: 0.3, cy: -0.4,fx: 0.3, fy: -0.4, radius: 1.35, stop: 0 #fff, stop: 1 #888); min-width: 80px;}"
  4. "QToolButton:hover {background: qradialgradient(cx: 0.3, cy: -0.4, fx: 0.3, fy: -0.4, radius: 1.35, stop: 0 #fff, stop: 1 #bbb);}"
  5. "QToolButton:pressed { background: qradialgradient(cx: 0.4, cy: -0.1, fx: 0.4, fy: -0.1, radius: 1.35, stop: 0 #fff, stop: 1 #ddd);}");
  6.  
  7. m_pbSummary->setToolButtonStyle(Qt::ToolButtonIconOnly);
  8. m_pbSummary->setIcon(QIcon(":/imgs/summary.png"));
To copy to clipboard, switch view to plain text mode