本文整理汇总了C++中ViewWidget::show方法的典型用法代码示例。如果您正苦于以下问题:C++ ViewWidget::show方法的具体用法?C++ ViewWidget::show怎么用?C++ ViewWidget::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewWidget
的用法示例。
在下文中一共展示了ViewWidget::show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addView
ViewPtr ViewCollectionWidgetMixed::addView(View::Type type, LayoutRegion region)
{
ViewPtr view;
mTotalRegion = merge(region, mTotalRegion);
if (type==View::VIEW_3D)
{
ViewWidget* overlay = this->mViewCacheOverlay->retrieveView();
overlay->getView()->setType(type);
overlay->show();
mOverlays.push_back(overlay);
view = overlay->getView();
this->addWidgetToLayout(mLayout, overlay, region);
}
else
{
mBaseRegion = merge(region, mBaseRegion);
view = mBaseLayout->addView(type, region);
// re-add the base widget with updated position in grid
this->addWidgetToLayout(mLayout, mBaseLayout, mBaseRegion);
}
view_utils::setStretchFactors(mLayout, mTotalRegion, 1);
return view;
}
示例2: addView
ViewPtr LayoutWidgetUsingViewWidgets::addView(View::Type type, LayoutRegion region)
{
ViewWidget* view = this->retrieveView(type);
view->getView()->setType(type);
mLayout->addWidget(view, region.pos.row, region.pos.col, region.span.row, region.span.col);
view_utils::setStretchFactors(mLayout, region, 1);
view->show();
mViews.push_back(view);
return view->getView();
}