本文整理汇总了C++中QAbstractButton::setVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ QAbstractButton::setVisible方法的具体用法?C++ QAbstractButton::setVisible怎么用?C++ QAbstractButton::setVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QAbstractButton
的用法示例。
在下文中一共展示了QAbstractButton::setVisible方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateButtons
void QDockWidgetPrivate::updateButtons()
{
Q_Q(QDockWidget);
QDockWidgetLayout *dwLayout = qobject_cast<QDockWidgetLayout*>(layout);
QStyleOptionDockWidget opt;
q->initStyleOption(&opt);
bool customTitleBar = dwLayout->widgetForRole(QDockWidgetLayout::TitleBar) != 0;
bool nativeDeco = dwLayout->nativeWindowDeco();
bool hideButtons = nativeDeco || customTitleBar;
bool canClose = hasFeature(this, QDockWidget::DockWidgetClosable);
bool canFloat = hasFeature(this, QDockWidget::DockWidgetFloatable);
QAbstractButton *button
= qobject_cast<QAbstractButton*>(dwLayout->widgetForRole(QDockWidgetLayout::FloatButton));
button->setIcon(q->style()->standardIcon(QStyle::SP_TitleBarNormalButton, &opt, q));
button->setVisible(canFloat && !hideButtons);
button
= qobject_cast <QAbstractButton*>(dwLayout->widgetForRole(QDockWidgetLayout::CloseButton));
button->setIcon(q->style()->standardIcon(QStyle::SP_TitleBarCloseButton, &opt, q));
button->setVisible(canClose && !hideButtons);
q->setAttribute(Qt::WA_ContentsPropagated,
(canFloat || canClose) && !hideButtons);
layout->invalidate();
}
示例2: refershCategoryVisible
void NavigationWidget::refershCategoryVisible(const AppsListModel::AppCategory category, const int appNums)
{
QAbstractButton *btn = button(category);
if (btn)
btn->setVisible(appNums);
}
示例3: Show
bool wxRadioBox::Show(unsigned int n, bool show)
{
QAbstractButton *qtButton = GetButtonAt( m_qtButtonGroup, n );
CHECK_BUTTON( qtButton, false );
qtButton->setVisible( show );
return true;
}
示例4: showEvent
void WDWizardPage::showEvent(QShowEvent *event) {
if (wizard()->currentPage() == this) {
setupDialogSize();
}
QAbstractButton *runButton = getRunButton(wizard());
if (NULL != runButton) {
runButton->setVisible(isFinalPage());
}
QWizardPage::showEvent(event);
}