本文整理汇总了C++中QWaylandSurface::hasContent方法的典型用法代码示例。如果您正苦于以下问题:C++ QWaylandSurface::hasContent方法的具体用法?C++ QWaylandSurface::hasContent怎么用?C++ QWaylandSurface::hasContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QWaylandSurface
的用法示例。
在下文中一共展示了QWaylandSurface::hasContent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onSurfaceMappedChanged
void Compositor::onSurfaceMappedChanged()
{
QWaylandSurface *surface = qobject_cast<QWaylandSurface *>(sender());
CompositorWindow *window = surfaceWindow(surface);
if(window && surface) {
if(surface->hasContent()) {
qDebug() << __PRETTY_FUNCTION__ << " MAPPED " << window << "appId" << window->appId() << "windowType" << window->windowType();
// If it was a window created by QtWebProcess, it may be not already in our WindowModel list
if (!WindowModel::isWindowAlreadyAdded(mWindowModels, window)) {
qDebug() << Q_FUNC_INFO << "Adding window" << window << "to our models";
emit windowAdded(QVariant::fromValue(static_cast<QQuickItem*>(window)));
WindowModel::addWindowForEachModel(mWindowModels, window);
}
emit windowShown(QVariant::fromValue(static_cast<QQuickItem*>(window)));
}
else {
qDebug() << __PRETTY_FUNCTION__ << " UNMAPPED " << window << "appId" << window->appId() << "windowType" << window->windowType();
if (window == mFullscreenWindow)
setFullscreenWindow(0);
emit windowHidden(QVariant::fromValue(static_cast<QQuickItem*>(window)));
}
}
}