本文整理汇总了C++中KPushButton::setWindowIcon方法的典型用法代码示例。如果您正苦于以下问题:C++ KPushButton::setWindowIcon方法的具体用法?C++ KPushButton::setWindowIcon怎么用?C++ KPushButton::setWindowIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KPushButton
的用法示例。
在下文中一共展示了KPushButton::setWindowIcon方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QGraphicsProxyWidget
PushButton::PushButton(QGraphicsWidget *parent)
: QGraphicsProxyWidget(parent),
d(new PushButtonPrivate(this))
{
d->background = new FrameSvg(this);
d->background->setImagePath("widgets/button");
d->background->setCacheAllRenderedFrames(true);
d->background->setElementPrefix("normal");
d->hoverAnimation = Animator::create(Animator::PixmapTransitionAnimation);
d->hoverAnimation->setTargetWidget(this);
KPushButton *native = new KPushButton;
connect(native, SIGNAL(pressed()), this, SIGNAL(pressed()));
connect(native, SIGNAL(pressed()), this, SLOT(pressedChanged()));
connect(native, SIGNAL(released()), this, SIGNAL(released()));
connect(native, SIGNAL(released()), this, SLOT(pressedChanged()));
connect(native, SIGNAL(clicked()), this, SIGNAL(clicked()));
connect(native, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool)));
setWidget(native);
native->setAttribute(Qt::WA_NoSystemBackground);
native->setWindowIcon(QIcon());
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
d->focusIndicator = new FocusIndicator(this, d->background);
d->syncBorders();
setAcceptHoverEvents(true);
connect(d->background, SIGNAL(repaintNeeded()), SLOT(syncBorders()));
d->initTheming();
d->syncFrame();
}