本文整理汇总了C++中FormWindow::core方法的典型用法代码示例。如果您正苦于以下问题:C++ FormWindow::core方法的具体用法?C++ FormWindow::core怎么用?C++ FormWindow::core使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormWindow
的用法示例。
在下文中一共展示了FormWindow::core方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: widgetToDom
DomUI *FormWindowDnDItem::domUi() const
{
DomUI *result = QDesignerDnDItem::domUi();
if (result != 0)
return result;
FormWindow *form = qobject_cast<FormWindow*>(source());
if (widget() == 0 || form == 0)
return 0;
QtResourceModel *resourceModel = form->core()->resourceModel();
QtResourceSet *currentResourceSet = resourceModel->currentResourceSet();
/* Short:
* We need to activate the original resourceSet associated with a form
* to properly generate the dom resource includes.
* Long:
* widgetToDom() calls copy() on QDesignerResource. It generates the
* Dom structure. In order to create DomResources properly we need to
* have the associated ResourceSet active (QDesignerResource::saveResources()
* queries the resource model for a qrc path for the given resource file:
* qrcFile = m_core->resourceModel()->qrcPath(ri->text());
* This works only when the resource file comes from the active
* resourceSet */
resourceModel->setCurrentResourceSet(form->resourceSet());
result = widgetToDom(widget(), form);
const_cast<FormWindowDnDItem*>(this)->setDomUi(result);
resourceModel->setCurrentResourceSet(currentResourceSet);
return result;
}