本文整理汇总了C++中QAbstractButton::setCheckable方法的典型用法代码示例。如果您正苦于以下问题:C++ QAbstractButton::setCheckable方法的具体用法?C++ QAbstractButton::setCheckable怎么用?C++ QAbstractButton::setCheckable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QAbstractButton
的用法示例。
在下文中一共展示了QAbstractButton::setCheckable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newButton
QAbstractButton* newButton( const QString& text, QWidget* parent = 0 )
{
QAbstractButton* pushButton = new QPushButton( parent );
pushButton->setText( text );
pushButton->setCheckable( true );
pushButton->setAutoExclusive( true );
pushButton->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );
pushButton->setAttribute( Qt::WA_LayoutUsesWidgetRect );
pushButton->setAttribute( Qt::WA_MacNoClickThrough );
return pushButton;
}
示例2: setWindowIcon
QT_BEGIN_NAMESPACE
ConversionWizard::ConversionWizard()
{
setWindowIcon(QIcon(QLatin1String(":/qt-project.org/qhelpconverter/assistant.png")));
setWindowTitle(tr("Help Conversion Wizard"));
setPixmap(QWizard::WatermarkPixmap,
QPixmap(QLatin1String(":/qt-project.org/qhelpconverter/assistant-128.png"))) ;
setOptions(QWizard::IndependentPages|QWizard::NoBackButtonOnLastPage
|QWizard::HaveHelpButton);
m_inputPage = new InputPage(&m_adpReader);
setPage(Input_Page, m_inputPage);
m_generalPage = new GeneralPage();
setPage(General_Page, m_generalPage);
m_filterPage = new FilterPage();
setPage(Filter_Page, m_filterPage);
m_filterPage->setMaximumHeight(240);
m_identifierPage = new IdentifierPage();
setPage(Identifier_Page, m_identifierPage);
m_pathPage = new PathPage();
setPage(Path_Page, m_pathPage);
m_pathPage->setMaximumHeight(240);
m_filesPage = new FilesPage();
setPage(Files_Page, m_filesPage);
m_filesPage->setMaximumHeight(240);
m_outputPage = new OutputPage();
setPage(Output_Page, m_outputPage);
m_outputPage->setMaximumHeight(240);
m_finishPage = new FinishPage();
setPage(Finish_Page, m_finishPage);
m_finishPage->setMaximumHeight(240);
connect(this, SIGNAL(currentIdChanged(int)),
this, SLOT(pageChanged(int)));
m_helpWindow = 0;
qApp->installEventFilter(this);
QAbstractButton *btn = button(QWizard::HelpButton);
btn->setCheckable(true);
connect(btn, SIGNAL(toggled(bool)), this, SLOT(showHelp(bool)));
}