当前位置: 首页>>代码示例>>C++>>正文


C++ QRadioButton::click方法代码示例

本文整理汇总了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();
}
开发者ID:newzen,项目名称:project-999,代码行数:10,代码来源:available_cash_dialog.cpp

示例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);
 }
开发者ID:corburn,项目名称:ISIS,代码行数:31,代码来源:MeasureCountFilter.cpp

示例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();
    }
开发者ID:corburn,项目名称:ISIS,代码行数:45,代码来源:AbstractNumberFilter.cpp


注:本文中的QRadioButton::click方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。