本文整理汇总了C++中QRadioButton::click方法的典型用法代码示例。如果您正苦于以下问题:C++ QRadioButton::click方法的具体用法?C++ QRadioButton::click怎么用?C++ QRadioButton::click使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QRadioButton
的用法示例。
在下文中一共展示了QRadioButton::click方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: selectRadioButton
/**
* Obtains the radio button on the activated item and fires its clicked signal.
*/
void AvailableCashDialog::selectRadioButton(QTreeWidgetItem *item, int column)
{
QRadioButton *button =
dynamic_cast<QRadioButton*>(ui.availableCashReceiptTreeWidget->
itemWidget(item, 0));
button->click();
}
示例2: createWidget
void MeasureCountFilter::createWidget()
{
QFont minMaxFont("SansSerif", 9);
QRadioButton * minButton = new QRadioButton("Minimum");
minButton->setFont(minMaxFont);
QRadioButton * maxButton = new QRadioButton("Maximum");
maxButton->setFont(minMaxFont);
minMaxGroup = new QButtonGroup;
connect(minMaxGroup, SIGNAL(buttonClicked(int)),
this, SLOT(updateMinMax(int)));
minMaxGroup->addButton(minButton, 0);
minMaxGroup->addButton(maxButton, 1);
minButton->click();
countSpinBox = new QSpinBox;
countSpinBox->setRange(0, std::numeric_limits< int >::max());
countSpinBox->setValue(count);
connect(countSpinBox, SIGNAL(valueChanged(int)),
this, SLOT(updateMeasureCount(int)));
// hide inclusive and exclusive buttons,
// and add spinbox for min measure count
getInclusiveExclusiveLayout()->itemAt(0)->widget()->setVisible(false);
getInclusiveExclusiveLayout()->itemAt(1)->widget()->setVisible(false);
getInclusiveExclusiveLayout()->addWidget(minButton);
getInclusiveExclusiveLayout()->addWidget(maxButton);
getInclusiveExclusiveLayout()->addSpacing(8);
getInclusiveExclusiveLayout()->addWidget(countSpinBox);
}
示例3: createWidget
void AbstractNumberFilter::createWidget()
{
QFont greaterThanLessThanFont("SansSerif", 9);
QRadioButton * lessThanButton = new QRadioButton("<=");
lessThanButton->setFont(greaterThanLessThanFont);
QRadioButton * greaterThanButton = new QRadioButton(">=");
greaterThanButton->setFont(greaterThanLessThanFont);
greaterThanLessThan = new QButtonGroup;
connect(greaterThanLessThan, SIGNAL(buttonClicked(int)),
this, SIGNAL(filterChanged()));
greaterThanLessThan->addButton(lessThanButton, 0);
greaterThanLessThan->addButton(greaterThanButton, 1);
// hide inclusive and exclusive buttons, and add greater than and less than
// in the inclusiveExclusiveLayout.
getInclusiveExclusiveLayout()->itemAt(0)->widget()->setVisible(false);
getInclusiveExclusiveLayout()->itemAt(1)->widget()->setVisible(false);
getInclusiveExclusiveLayout()->addWidget(lessThanButton);
getInclusiveExclusiveLayout()->addWidget(greaterThanButton);
lineEditText = new QString;
lineEdit = new QLineEdit;
lineEdit->setMinimumWidth(75);
connect(lineEdit, SIGNAL(textChanged(QString)),
this, SLOT(updateLineEditText(QString)));
connect(lineEdit, SIGNAL(textChanged(QString)),
this, SIGNAL(filterChanged()));
QHBoxLayout * layout = new QHBoxLayout;
QMargins margins = layout->contentsMargins();
margins.setTop(0);
margins.setBottom(0);
layout->setContentsMargins(margins);
layout->addWidget(lineEdit);
layout->addStretch();
getMainLayout()->addLayout(layout);
// FIXME: QSettings should handle this
lessThanButton->click();
}