本文整理汇总了C++中KPushButton::setMinimumSize方法的典型用法代码示例。如果您正苦于以下问题:C++ KPushButton::setMinimumSize方法的具体用法?C++ KPushButton::setMinimumSize怎么用?C++ KPushButton::setMinimumSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KPushButton
的用法示例。
在下文中一共展示了KPushButton::setMinimumSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupActions
void CommandMonitorItem::setupActions() {
KPushButton* btnView = new KPushButton();
btnView->setIcon(KIcon(KStandardDirs::locate( "appdata", "pixmap/22x22/eye.png")));
btnView->setMinimumSize(40,22);
btnView->setStyleSheet("border: 1px black solid;border-color:#555555;border-style:solid;border-radius:3px;");
actionLayout->addWidget(btnView);
QObject::connect(btnView, SIGNAL(clicked()), this, SLOT(connectTerm()));
KPushButton* btnStartNow = new KPushButton();
btnStartNow->setIcon(KIcon("arrow-right"));
btnStartNow->setMinimumSize(40,22);
btnStartNow->setStyleSheet("border: 1px black solid;border-color:#555555;border-style:solid;border-radius:3px;");
actionLayout->addWidget(btnStartNow);
KPushButton* btnPause = new KPushButton();
btnPause->setIcon(KIcon(KStandardDirs::locate( "appdata", "pixmap/22x22/pause.png")));
btnPause->setMinimumSize(40,22);
btnPause->setStyleSheet("border: 1px black solid;border-color:#555555;border-style:solid;border-radius:3px;");
actionLayout->addWidget(btnPause);
KPushButton* btnStop = new KPushButton();
btnStop->setIcon(KIcon("dialog-close"));
btnStop->setMinimumSize(40,22);
btnStop->setStyleSheet("border: 1px black solid;border-color:#555555;border-style:solid;border-radius:3px;");
actionLayout->addWidget(btnStop);
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
actionLayout->addItem(horizontalSpacer);
}
示例2: KPushButton
KPushButton * PostWidget::addButton(const QString & objName, const QString & toolTip, const KIcon & icon)
{
KPushButton * button = new KPushButton(icon, QString(), _mainWidget);
button->setObjectName(objName);
button->setToolTip(toolTip);
button->setIconSize(QSize(16,16));
button->setMinimumSize(QSize(20, 20));
button->setMaximumSize(QSize(20, 20));
button->setFlat(true);
button->setVisible(false);
button->setCursor(Qt::PointingHandCursor);
d->mUiButtons.insert(objName, button);
d->buttonsLayout->addWidget( button, 1, d->mUiButtons.count() );
return button;
}