本文整理汇总了C++中QQmlProperty::write方法的典型用法代码示例。如果您正苦于以下问题:C++ QQmlProperty::write方法的具体用法?C++ QQmlProperty::write怎么用?C++ QQmlProperty::write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQmlProperty
的用法示例。
在下文中一共展示了QQmlProperty::write方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: property
VideoRendererItem::VideoRendererItem(QQuickItem *parent)
: HighQualityTextureItem(parent)
, d(new Data(this))
{
d->mposd = new MpOsdItem(this);
d->letterbox = new LetterboxItem(this);
const QQmlProperty property(d->letterbox, "anchors.centerIn");
property.write(QVariant::fromValue(this));
setZ(-1);
setAcceptHoverEvents(true);
setAcceptedMouseButtons(Qt::AllButtons);
setFlag(ItemAcceptsDrops, true);
connect(d->mposd, &MpOsdItem::targetSizeChanged,
this, &VideoRendererItem::osdSizeChanged);
}
示例2: property
VideoRenderer::VideoRenderer(QQuickItem *parent)
: HighQualityTextureItem(parent)
, d(new Data(this))
{
d->letterbox = new LetterboxItem(this);
const QQmlProperty property(d->letterbox, u"anchors.centerIn"_q);
property.write(QVariant::fromValue(this));
setZ(-1);
setAcceptHoverEvents(true);
setAcceptedMouseButtons(Qt::AllButtons);
setFlag(ItemAcceptsDrops, true);
connect(&d->sizeChecker, &QTimer::timeout, [=] () { d->updateOsdSize(); });
d->sizeChecker.setInterval(300);
d->measure.setTimer([=]() {
if (_Change(d->fps, d->measure.get()))
emit fpsChanged(d->fps);
}, 100000);
}
示例3: property
VideoRenderer::VideoRenderer(QQuickItem *parent)
: Super(parent), d(new Data)
{
d->p = this;
d->letterbox = new LetterboxItem(this);
const QQmlProperty property(d->letterbox, u"anchors.centerIn"_q);
property.write(QVariant::fromValue(this));
setZ(-1);
setAcceptHoverEvents(true);
setAcceptedMouseButtons(Qt::AllButtons);
setFlag(ItemAcceptsDrops, true);
connect(&d->sizeChecker, &QTimer::timeout, [this] () {
if (_Change(d->frame.size, d->fboSizeHint()) |
_Change(d->osd.size, d->osdSizeHint())) {
d->redraw = true;
reserve(UpdateAll);
}
});
d->sizeChecker.setInterval(300);
d->sizeChecker.setSingleShot(true);
}