I have SignatureEditorForm class, which inherits QDialog class:
SignatureEditorForm(QWidget* parent_widget) : QDialog(parent_widget)
{
resize(SIGNATURE_EDITOR_SIZE);
setWindowTitle(QString("Signature Editor"));
setWindowFlags(Qt::Window | Qt::MSWindowsFixedSizeDialogHint | Qt::WindowCloseButtonHint);
setModal(true);
{
QPushButton* const button = new QPushButton(QString("<"), this);
const QSize BUTTON_SIZE = QSize(22, 22);
button->resize(BUTTON_SIZE);
}
}
It contains QPushButton which has size (width: 22, height: 22) and "<" caption. I have such picture of this widget (SignatureEditorForm). QPushButton has size (width: 20, height: 20). How can I set precise size of button?
P.S. I tried to use setMinimumSize, but it has not effects.
P.P.S. this line button->setStyleSheet("border: 1px solid black; background: white"); gives such effect (precise size)