Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我使用setQuery(QUrl(file.xsl))时,它可以工作。但是,如果我将文件加载到 aQString并调用setQuery(theString),则后续evaluateTo()失败(布尔异常和空结果)。
setQuery(QUrl(file.xsl))
QString
setQuery(theString)
evaluateTo()
这里有什么问题?
值得注意的是,它setFocus()确实适用于QUrl(file.xml)和QString从文件加载。
setFocus()
QUrl(file.xml)
原因是:
document('')
setQuery()
除了这种情况,setQuery(QString)本身一般都可以。
setQuery(QString)