本文整理汇总了C++中QSpinBox::setDecimals方法的典型用法代码示例。如果您正苦于以下问题:C++ QSpinBox::setDecimals方法的具体用法?C++ QSpinBox::setDecimals怎么用?C++ QSpinBox::setDecimals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSpinBox
的用法示例。
在下文中一共展示了QSpinBox::setDecimals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWidget
StimConfigTab::StimConfigTab (QWidget *parent)
: QWidget(parent)
{
QGridLayout *layout = new QGridLayout;
layout->addWidget(new QLabel("Number of pulse trains"), 0, 0,
Qt::AlignRight | Qt::AlignVCenter);
QSpinBox *nTrainsSpinBox = new QSpinBox();
nTrainsSpinBox->setAlignment(Qt::AlignRight);
nTrainsSpinBox->setDecimals(1);
nTrainsSpinBox->setRange(1,200);
layout->addWidget(nTrainsSpinBox, 0, 1);
QPushButton *continuousButton = new QPushButton("Contiuous");
layout->addWidget(continuousButton,0,2);
layout->addWidget(new QLabel("Inter-train Interval"), 1, 0,
Qt::AlignRight | Qt::AlignVCenter);
QSpinBox *trainIntervalSpinBox = new QSpinBox();
trainIntervalSpinBox->setAlignment(Qt::AlignRight);
trainIntervalSpinBox->setSuffix(" ms");
trainIntervalSpinBox->setRange(500, 50000);
layout->addWidget(trainIntervalSpinBox, 1, 1);
QPushButton *stimSingleButton = new QPushButton("Trigger Single Pulse Sequence");
layout->addWidget(stimSingleButton,2,0);
QPushButton *startStimButton = new QPushButton("Start Pulse Sequence");
layout->addWidget(stimSingleButton,2,1);
QPushButton *abortStimButton = new QPushButton("Abort");
layout->addWidget(abortSingleButton,2,2);
setLayout(layout);
}