本文整理汇总了C++中KPushButton::setStyleSheet方法的典型用法代码示例。如果您正苦于以下问题:C++ KPushButton::setStyleSheet方法的具体用法?C++ KPushButton::setStyleSheet怎么用?C++ KPushButton::setStyleSheet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KPushButton
的用法示例。
在下文中一共展示了KPushButton::setStyleSheet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}