本文整理汇总了C++中QSpinBox::hide方法的典型用法代码示例。如果您正苦于以下问题:C++ QSpinBox::hide方法的具体用法?C++ QSpinBox::hide怎么用?C++ QSpinBox::hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSpinBox
的用法示例。
在下文中一共展示了QSpinBox::hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateCoordSysWidget
void ReflectanceModelDockWidget::updateCoordSysWidget(int index)
{
QString name = ui_->reflectanceModelComboBox->itemText(index);
lb::ReflectanceModel* model = reflectanceModels_[name.toLocal8Bit().data()];
QLabel* halfLabel = ui_->halfDiffCsNumAngle1Label;
QLabel* specLabel = ui_->specularCsNumAngle1Label;
QLabel* spheLabel = ui_->sphericalCsNumAngle1Label;
QSpinBox* halfSpinBox = ui_->halfDiffCsNumAngle1SpinBox;
QSpinBox* specSpinBox = ui_->specularCsNumAngle1SpinBox;
QSpinBox* spheSpinBox = ui_->sphericalCsNumAngle1SpinBox;
// Hide labels and fields for an anisotropic BRDF if an isotropic reflectance model is selected.
if (model->isIsotropic()) {
halfLabel->hide();
halfSpinBox->hide();
ui_->halfDiffCoordSysFormLayout->removeWidget(halfLabel);
ui_->halfDiffCoordSysFormLayout->removeWidget(halfSpinBox);
specLabel->hide();
specSpinBox->hide();
ui_->specularCoordSysFormLayout->removeWidget(specLabel);
ui_->specularCoordSysFormLayout->removeWidget(specSpinBox);
spheLabel->hide();
spheSpinBox->hide();
ui_->sphericalCoordSysFormLayout->removeWidget(spheLabel);
ui_->sphericalCoordSysFormLayout->removeWidget(spheSpinBox);
}
else {
ui_->halfDiffCoordSysFormLayout->insertRow(2, halfLabel, halfSpinBox);
halfLabel->show();
halfSpinBox->show();
ui_->specularCoordSysFormLayout->insertRow(2, specLabel, specSpinBox);
specLabel->show();
specSpinBox->show();
ui_->sphericalCoordSysFormLayout->insertRow(2, spheLabel, spheSpinBox);
spheLabel->show();
spheSpinBox->show();
}
}
示例2: setReminder
void OtherReminderDialog::setReminder(bool allDay, int minutes)
{
if (allDay) {
minutesSB->hide();
minutesL->hide();
hoursSB->hide();
hoursL->hide();
} else {
minutesSB->show();
minutesL->show();
hoursSB->show();
minutesL->show();
}
int weeks = minutes / (7 * 24 * 60);
int days = (minutes - (weeks * 7 * 24 * 60)) / (24 * 60);
int hours = (minutes - (((weeks * 7) + days) * 24 * 60)) / 60;
minutesSB->setValue(minutes % 60);
hoursSB->setValue(hours);
daysSB->setValue(days);
weeksSB->setValue(weeks);
}