Hello.

Is there any way to fill the whole button with its assigned icon?

I am doing it this way, so that images should exactly match the size of the buttons, but there's always an empty margin around the images.

Qt Code:
  1. QSize size = ui->plano_1->size();
  2. qDebug() << Q_FUNC_INFO << QString("icon size: %1,%2").arg(size.width()).arg(size.height());
  3. ui->plano_1->setIcon(QIcon(myBudget->getPlano(1)));
  4. ui->plano_1->setIconSize(size);
  5. ui->plano_1->setContentsMargins(0, 0, 0, 0);
To copy to clipboard, switch view to plain text mode 

As you see, I also tried using setContentsMargins(0,0,0,0). But it doesn't seem to make any difference.

Thank you for any response