本文整理汇总了C++中QDomImplementation::createDocument方法的典型用法代码示例。如果您正苦于以下问题:C++ QDomImplementation::createDocument方法的具体用法?C++ QDomImplementation::createDocument怎么用?C++ QDomImplementation::createDocument使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QDomImplementation
的用法示例。
在下文中一共展示了QDomImplementation::createDocument方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDomDocument
QDomDocument QDomImplementationProto:: createDocument(const QString& nsURI, const QString& qName, const QDomDocumentType& doctype)
{
QDomImplementation *item = qscriptvalue_cast<QDomImplementation*>(thisObject());
if (item)
return item->createDocument(nsURI, qName, doctype);
return QDomDocument();
}
示例2: sipConvertFromNewType
static PyObject *meth_QDomImplementation_createDocument(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
const QString * a0;
int a0State = 0;
const QString * a1;
int a1State = 0;
const QDomDocumentType * a2;
QDomImplementation *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "BJ1J1J9", &sipSelf, sipType_QDomImplementation, &sipCpp, sipType_QString,&a0, &a0State, sipType_QString,&a1, &a1State, sipType_QDomDocumentType, &a2))
{
QDomDocument *sipRes;
Py_BEGIN_ALLOW_THREADS
sipRes = new QDomDocument(sipCpp->createDocument(*a0,*a1,*a2));
Py_END_ALLOW_THREADS
sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);
sipReleaseType(const_cast<QString *>(a1),sipType_QString,a1State);
return sipConvertFromNewType(sipRes,sipType_QDomDocument,NULL);
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_QDomImplementation, sipName_createDocument, NULL);
return NULL;
}
示例3: create
void MenuFile::create()
{
QDomImplementation impl;
QDomDocumentType docType = impl.createDocumentType( MF_MENU, MF_PUBLIC_ID, MF_SYSTEM_ID );
m_doc = impl.createDocument(QString(), MF_MENU, docType);
}