本文整理汇总了C++中QSpinBox::sizePolicy方法的典型用法代码示例。如果您正苦于以下问题:C++ QSpinBox::sizePolicy方法的具体用法?C++ QSpinBox::sizePolicy怎么用?C++ QSpinBox::sizePolicy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSpinBox
的用法示例。
在下文中一共展示了QSpinBox::sizePolicy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_addInputButton_clicked
void MultisigDialog::on_addInputButton_clicked()
{
if(isFirstRawTx){
isFirstRawTx = false;
ui->txInputsScrollArea->show();
}
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
QFrame* txInputFrame = new QFrame(ui->txInputsWidget);
sizePolicy.setHeightForWidth(txInputFrame->sizePolicy().hasHeightForWidth());
txInputFrame->setFrameShape(QFrame::StyledPanel);
txInputFrame->setFrameShadow(QFrame::Raised);
txInputFrame->setObjectName(QStringLiteral("txInputFrame"));
QVBoxLayout* frameLayout = new QVBoxLayout(txInputFrame);
frameLayout->setSpacing(1);
frameLayout->setObjectName(QStringLiteral("txInputFrameLayout"));
frameLayout->setContentsMargins(6, 6, 6, 6);
QHBoxLayout* txInputLayout = new QHBoxLayout();
txInputLayout->setObjectName(QStringLiteral("txInputLayout"));
QLabel* txInputIdLabel = new QLabel(txInputFrame);
txInputIdLabel->setObjectName(QStringLiteral("txInputIdLabel"));
txInputIdLabel->setText(QApplication::translate("MultisigDialog", strprintf("%i. Tx Hash: ", ui->inputsList->count()+1).c_str(), 0));
txInputLayout->addWidget(txInputIdLabel);
QLineEdit* txInputId = new QLineEdit(txInputFrame);
txInputId->setObjectName(QStringLiteral("txInputId"));
txInputLayout->addWidget(txInputId);
QSpacerItem* horizontalSpacer = new QSpacerItem(10, 20, QSizePolicy::Fixed, QSizePolicy::Minimum);
txInputLayout->addItem(horizontalSpacer);
QLabel* txInputVoutLabel = new QLabel(txInputFrame);
txInputVoutLabel->setObjectName(QStringLiteral("txInputVoutLabel"));
txInputVoutLabel->setText(QApplication::translate("MultisigDialog", "Vout Position: ", 0));
txInputLayout->addWidget(txInputVoutLabel);
QSpinBox* txInputVout = new QSpinBox(txInputFrame);
txInputVout->setObjectName("txInputVout");
sizePolicy.setHeightForWidth(txInputVout->sizePolicy().hasHeightForWidth());
txInputVout->setSizePolicy(sizePolicy);
txInputLayout->addWidget(txInputVout);
QPushButton* inputDeleteButton = new QPushButton(txInputFrame);
inputDeleteButton->setObjectName(QStringLiteral("inputDeleteButton"));
QIcon icon;
icon.addFile(QStringLiteral(":/icons/remove"), QSize(), QIcon::Normal, QIcon::Off);
inputDeleteButton->setIcon(icon);
inputDeleteButton->setAutoDefault(false);
connect(inputDeleteButton, SIGNAL(clicked()), this, SLOT(deleteFrame()));
txInputLayout->addWidget(inputDeleteButton);
frameLayout->addLayout(txInputLayout);
ui->inputsList->addWidget(txInputFrame);
}