本文整理汇总了C++中QSlider::setLineStep方法的典型用法代码示例。如果您正苦于以下问题:C++ QSlider::setLineStep方法的具体用法?C++ QSlider::setLineStep怎么用?C++ QSlider::setLineStep使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSlider
的用法示例。
在下文中一共展示了QSlider::setLineStep方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setVariableLayout
void AutoGraspGenerationDlg::setVariableLayout()
{
//cleanup
for (unsigned int i=0; i<varNames.size(); i++) {
varGridLayout->remove(varNames[i]);
varGridLayout->remove(varCheck[i]);
varGridLayout->remove(varInput[i]);
varGridLayout->remove(varTarget[i]);
varGridLayout->remove(varConfidence[i]);
delete varNames[i];
delete varCheck[i];
delete varInput[i];
delete varTarget[i];
delete varConfidence[i];
}
varNames.clear();
varCheck.clear();
varInput.clear();
varTarget.clear();
varConfidence.clear();
varLayouts.clear();
int size = mHand->getEigenGrasps()->getSize() + 7;
for (int i=0; i<size; i++) {
QLabel *name = new QLabel("foo",variableBox);
QCheckBox *check = new QCheckBox(variableBox);
connect(check, SIGNAL(clicked()), this, SLOT(variableCheckBoxChanged()));
QCheckBox *inputCheck = new QCheckBox(variableBox);
connect(inputCheck, SIGNAL(clicked()), this, SLOT(variableInputChanged()));
QLabel *target = new QLabel("N/A",variableBox);
QSlider *slider = new QSlider(0,100,10,0,Qt::Horizontal,variableBox);
connect(slider, SIGNAL(sliderReleased()), this, SLOT(variableInputChanged()));
slider->setLineStep(1);
slider->setMaximumWidth(50);
varGridLayout->addWidget(check,2+i,0);
varGridLayout->addWidget(name,2+i,1);
varGridLayout->addWidget(inputCheck,2+i,2);
varGridLayout->addWidget(target,2+i,3);
varGridLayout->addWidget(slider,2+i,4);
varCheck.push_back( check );
varNames.push_back( name );
varInput.push_back( inputCheck );
varTarget.push_back( target );
varConfidence.push_back( slider );
}
}